DirectoryIndex directive


Purpose

When a client requests a directory, HTTPd can return a pre-written index, or generate one from the filesystem. The DirectoryIndex directive sets the file HTTPd should look for as a prewritten index to a given directory.


Syntax

DirectoryIndex file

Where file is a file name.

Only one DirectoryIndex directive is allowed in the server configuration file.


File

srm.conf

Default

If you do not specify a DirectoryIndex, HTTPd assumes:

DirectoryIndex index.html


Example

DirectoryIndex .index.html

This would set DirectoryIndex to .index.html. A request for /dir would cause the server to look for the file DocumentRoot/dir/.index.html. If found, the server would send it back to the client. Otherwise, it would create and return an index from the filesystem.


[Back] Return to Resource Configuration File Overview
NCSA HTTPd Development Team / httpd@ncsa.uiuc.edu / Last Modified 7-12-95