Opentopia Directory Encyclopedia Tools

Webserver directory index

Encyclopedia : W : WE : WEB : Webserver directory index


When an HTTP client (generally a web browser) requests a URL that points at just a directory rather than at a file within a directory the web server will generally serve up some kind of main or index page.

index.html is the traditional filename for such a page, but most modern HTTP servers offer a configurable list of filenames for the server to use as an index if possible. If a server is configured to support server-side scripting, then there will usually be entries in the list to allow dynamic content to be used as the index page (e.g. index.php, index.shtml, default.asp). For example, in the popular opensource web server Apache, the list of filenames is controlled by the DirectoryIndex directive in the main server configuration file or in the configuration file for that directory.

If the server cannot find a file with any of the names listed in its configuration, it may either return an error (generally 404 (Not Found) ) or generate its own index page listing files in the directory. This is usually also a configurable option.

In order to allow relative links to work correctly, the URL for a directory must end with a slash. If it does not then most web servers will send an HTTP redirect to add the slash.

http://www.example.com is technically not a valid URL, but almost all modern browser (and webservers if the browsers do not) will automatically correct it to http://www.example.com/ and this will then result in the serving of the index page from the root directory of the website. Thus, the home page is usually index.html, and is often called an “index page” (despite the fact that it is usually more like a table of contents than an index).

 


From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.

Search Titles
0123456789
ABCDEFGHIJ
KLMNOPQRST
UVWXYZ?

E-mail this article to:

Personal Message: