Directory Directives

DirectoryIndex

Description Define the default index file to serve for directory requests
Synopsis DirectoryIndex document
Context Default Server, Virtual host, Route
Example DirectoryIndex index.html
Notes

The DirectoryIndex directive specifies a document that may be served when a HTTP request is made for a directory. Multiple directory index files may be specified and they will be tested in order. The first index that exists will be served.

The DirectoryIndex argument must be a simple filename without any directory portion.

If a client requests a directory, but without a trailing "/" in the URI, the client will be redirected to the URI with a trailing "/". When the client then uses that URI, the directory index file will be used for the response.

For example: if a DirectoryIndex of "index.html" is specified and a user requests http://www.acme.com/products/. Then the document /products/index.html will be returned to the user.

IndexOptions

Description Define directory indexing options
Synopsis IndexOptions [[+|-] options] ...
Context Default server, Virtual host, Route
Example IndexOptions FancyIndexing
Notes

The available options are:

  • FancyIndexing — Enable fancy indexing
  • FoldersFirst — List folders first
  • HtmlTable — Display listings in a HTML table

IndexOrder

Description Set the default ordering of the directory listing
Synopsis IndexOrder [Ascending|Descending] [Name|Date|Size|Description]
Context Default server, Virtual host, Route
Example IndexOrder Ascending Name
Notes

This directive controls the order of listings. By default, listings are displayed in filename ascending order. This directive only applies if IndexOptions is set to display listings in fancy format.

© Embedthis Software. All rights reserved.