Webserver directory index
From Wikipedia, the free encyclopedia
When an HTTP client (generally a web browser) requests a URL that points to a directory structure instead of an actual web page within the directory, the web server will generally serve a general page, which is often referred to as a 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 that the server can use as an index. If a server is configured to support server-side scripting, the list will usually include entries allowing dynamic content to be used as the index page (e.g. index.php, index.shtml, default.asp). An example is the popular open source web server Apache, where 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 is unable to 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 the files in the directory. Usually this option is also configurable.
In theory, for relative links to function properly, the URL pointing to a directory should end with a forward slash. Otherwise most web servers will send an HTTP redirect to add the slash.
For example, strictly speaking http://www.example.com
is not a valid URL, though most modern browsers will automatically correct it (otherwise the webserver will) to http://www.example.com/
, which will 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 referred to as an “index page,” despite the fact that it is really more like a table of contents than an index).
[edit] Entrance
Since the index page is often the first page of a website that a user sees, it is sometimes used to offer a menu of language options. Here the name for each language will be displayed in that particular language (for example, the selection for German will display as Deutsch).
In some cases however the language options will only be listed in one particular language, which in most cases is English due to its widespread usage internationally. But this will be ineffective if readers aren't familiar with the term for their native language in that particular language. A similar situation can occur if the language choice is only accessible via a word in a language the reader doesn't understand or just a word he/she doesn't understand (though he/she has basic knowledge of this language).
[edit] Examples
- http://www.asus.com/ displaying the name of several countries in English with native name of the major languages spoken there.
- http://www.opensuse.org/, an entrance similar to www.wikipedia.org