faqts : Computers : Internet : Web Servers : Apache

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

7 of 13 people (54%) answered Yes
Recently 5 of 10 people (50%) answered Yes

Entry

What is considered to be a reasonable set of file names when a directory is requested?

Aug 1st, 2004 09:19
Cinley Rodick, unknown unknown, http://www.generalforums.com . http://www.generalforums.com/yellow/


I would stick to a short list. Index.htm is a relic of Windows 3.1 based
systems.
For a bilingual server, for example, one may set
index.html       index
then for a single-language directory one can use index.html, while for
those which have representations in two languages one can prepare,
say, index.en.html  AND index.ru.html. Then based on the Browser
Language preference one gets the preferred version. One also
has to set  in httpd.conf:
AddLanguage ru .ru
LanguagePriority ru en fr de
Alternate:
I tend to use index.html.<language>
Some people will append ".html" or even "/index.html" to a URL which (on
the server I use) will get what they want without it.  Putting the type
before the language caters for this.  Of course I still link to the
objects without ".html.en" or whatever on the end.
The basic directives I use for this are:
Options +MultiViews
DirectoryIndex index
And:
I use index.html index.htm index.shtml index.cgi (in .htaccess) because 
I might want to have SSI on a default page or in some cases a default 
CGI (to generate my own file listing on a server with Indexes 
disenabled). Although on a server level you may want the multi language 
support too.