DirectoryIndex directive sets the list of
resources to look for when the client requests an index of the
directory by specifying a / at the end of the directory name.
local-url local-url ...Default: index.html Server config, virtual host, directory, .htaccess
local-url is the URL of a document on the
server relative to the requested directory; it is usually the name of
a file in the directory. Several URLs may be given, in which case the
server will return the first one that it finds. If none of the
resources exists and
IndexOptions is set, the
server will generate its own listing of the directory. For example,
if this is the specification:
then a request for http://myserver/docs/ would return http://myserver/docs/index.html if it did not exist; if it exists, the request would list the directory, provided indexing was allowed. Note that the documents do not need to be relative to the directory:
DirectoryIndex index.html index.txt /cgi-bin/index.pl
This would cause the CGI script /cgi-bin/index.pl to be executed if neither index.html nor index.txt existed in a directory.
A common technique for getting a CGI script to run immediately when a
site is accessed is to declare it as the
If this is to work, redirection to
have been arranged using
ScriptAliasMatch higher up in the Config file.
The Config file from ... /site.ownindex is as follows: ...