A lesson on indexes

OK boys and girls, here's a lesson on webserving for you. Everything accessable on the internet is actually just a file sitting in a folder on a webserver. When you load a page in your web-browser you are requesting that the webserver send the page to you.

A special case comes about when you request a directory instead of a normal file. The most common way of dealing with this is placing an index file inside the directory. If an index is present then that page will be returned to your browser.

Here's an example. When you load the URL http://sillysoft.net/forums/ you are requesting the 'forums' folder from the webserver that hosts sillysoft.net. It will return the contents of the index file inside that folder. So it is functionally the same as requesting http://sillysoft.net/forums/index.php (this is because it uses PHP. A more common filename is index.html).

However, if no index file exists then most webservers will just send back a list of the contents of that folder. Sometimes this can be a sneaky way of finding stuff that isn't directly linked to. For example if you look at http://www.plaidworks.com/chuqui/ you will find some weird stuff, like this. And then this is pretty funny if you're down with the star trek mojo.

Anyway, the conclusion of this lesson is use index files to control what the default contents of any directory are. Note that this also works at the root level of domains. So http://vyxle.froodq.com/ will show whatever is located at http://vyxle.froodq.com/index.html

Posted by dustin on March 31, 2004 with category tags of

   

VorgTag Cloud

Written by dustin
Latest Photo
Quote of Now:
Friends
Popular Posts
Computer Games

Hey You! Subscribe to dustin's RSS feed.
Or get wider opinion in the Vorg All Author feed.

 
 

Members login here.
© Vorg Group.