Webserver directory index |
When an HTTP client (generally a web browser) requests a URL that points at just a directory (computing) rather than at a computer 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 decent webservers will allow a list of filenames to be configured. If a server is set up to support the list of filenames is controlled by the DirectoryIndex directive in the configuration file.
If the webserver cannot find a page with any of the names its set to try then it may either return an error (generally 403 forbidden) or create its own index page of the files in the directory. This is usually also a configuarable 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 webservers will send a http redirect to add the slash.
http://www.mysite.tld is not really a valid url but almost all browsers will turn it into http://www.mysite.tld/ automatically and this will then result in the serving up of the index page from the root directory of the website.|
|