| Whole document tree ![[APACHE DOCUMENTATION]](../images/sub.gif)  Apache HTTP Server Version 1.3Module mod_dirThis module provides for "trailing slash" redirects and serving directory index files. Status: Base SummaryThe index of a directory can come from one of two sources:
 A "trailing slash" redirect is issued when the server
    receives a request for a URL
    http://servername/foo/dirname where
    dirname is a directory. Directories require a
    trailing slash, so  DirectivesDirectoryIndex directiveSyntax: DirectoryIndex local-url [local-url] ...Default: DirectoryIndex
    index.htmlContext: server config, virtual host, directory, .htaccess Override: Indexes Status: Base Module: mod_dir The 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 a directory name.
    Local-url is the (%-encoded) 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 exist and the  Example: 
      then a request forhttp://myserver/docs/would
    returnhttp://myserver/docs/index.htmlif it
    exists, or would list the directory if it did not.Note that the documents do not need to be relative to the directory; 
      would cause the CGI script/cgi-bin/index.plto be
    executed if neitherindex.htmlorindex.txtexisted in a directory.
 Apache HTTP Server Version 1.3    |