HTML noob doesn't know how to use index

Ben Solon, Mon Mar 05 2012, 12:11AM

Hey guys, I just started to put together a website. I am a bit of a noob with HTML though... I can write a we page just fine, but I dont know how to use the index.html file to avoid having my homepage say:

Index of/
myfile.html

You know you can't find info when Wikipedia has the best information out there. Lol. All it said is that if you don't have an index file, your homepage will show up as a browser generated index. Ie: index of/

So if anyone can tell me how I can set up my files, I would apreciate it.

Thanks,
ben
Re: HTML noob doesn't know how to use index
tobias, Mon Mar 05 2012, 12:38AM

You can rename myfile.html to index.html or change the configuration of your server.
If you are using apache is easy: modify the file apache2.conf.
By default it will display only index.html, index.cgi, index.pl, index.php and index.xhtml as a page instead of a directory
Re: HTML noob doesn't know how to use index
Ben Solon, Mon Mar 05 2012, 12:52AM

I am writing the code from scratch. My hosting is done in 000webhost until I finish designing it, then I am going to find a legitamate host. I have a couple pages so far, one being the homepage, the other being some experimental results. Do I just set the homepage as the index? And if so where do I put the rest of my pages?

If you want to have a look, the site is Link2 here.

Edit: problem solved. By default, when you setup an account on 000webhost, they have a file called default.php. This is what displays the default message saying you have set up your site. If you just rename your homepage code default, that page gets displayed.
Re: HTML noob doesn't know how to use index
tobias, Mon Mar 05 2012, 01:01AM

I see it.
Rename the file Homepage.html to index.html