Welcome, Guest. [ Log In ]
Question   Creating an index page
Search KBase

Related Links:
· How do I make my web pages?
· How do I edit the text of my web page?
· Can I make my index page a cgi or php script?
· HTML Basics

Top 5 in this Area:
1. Creating an index page
2. HTML Basics
3. Can I hide my HTML code?
4. Which web authoring (HTML-generating) programs do you support?
5. What is CSS, and do you support it?

Creating an index page
I've uploaded my web site to your server, but whenever I try to view it at a given URL, I get a listing of the contents of the directory they are stored in - not the site itself.

Index Pages

When you try to go to a website, such as http://www.mywebsite.com, your browser requests a given domain from the web server (the computer where your domain and web page files are located). The web server needs to know which page to send.

Since the URL http://www.mywebsite.com/ does not specify a certain page, the server will look for an index page --- that is, a page called index.html or index.htm (you can also have index.cgi, index.php, index.shtml, index.php3, etc.., but that's another story for another time.)

If there is an index page, that's the page the server will send. If there is not, your viewer will see a list of all of the files at that site. And you don't want that!

Making an index page is easy --- just create an .html document, and name it index.html. Ideally, this will be your main page, since it's the first one your visitors will see --- but you can make it say anything you want.

Note that filenames on Linux are case sensitive, and the name of your index document must be lower case.

Last updated: Jan 03, 2006.

User Post (2005-06-10 16:51:55 by shw)
You can also use a symbolic link that points to whatever file you want as your index.html. Log in to your shell account, cd to your website directory, and use the Unix command ln. The sequence below makes a symbolic link from index.html to the file Placeholder2.html in the website directory. When a browser views the website, the page displayed is Placeholder2.html:

[ike]$ ln -s Placeholder2.html index.html
[ike]$ ls -Flas
total 20
4 drwxr-xr-x 3 cehw pg188521 4096 Jun 10 15:52 ./
4 drwxr-x--x 5 cehw pg188521 4096 Jun 4 20:23 ../
4 -rwxr-xr-x 1 cehw pg188521 3642 Jun 9 15:28 Placeholder.html*
4 -rwxr-xr-x 1 cehw pg188521 3805 Jun 10 15:51 Placeholder2.html*
4 drwxr-xr-x 2 cehw pg188521 4096 Jun 10 06:19 image/
0 lrwxrwxrwx 1 cehw pg188521 17 Jun 10 15:52 index.html -> Placeholder2.html*