mod_dir.xml revision f5cbf3a7818c08d2f19c04fdf4f47257eea7d3c6
<?xml version="1.0"?>
<modulesynopsis>
<name>mod_dir</name>
<description>Provides for "trailing slash" redirects and
serving directory index files</description>
<status>Base</status>
<identifier>dir_module</identifier>
<summary>
<p>The index of a directory can come from one of two sources:</p>
<ul>
<li>A file written by the user, typically called
>DirectoryIndex</directive> directive sets the
name of this file. This is controlled by
<module>mod_dir</module>.</li>
<li>Otherwise, a listing generated by the server. This is
provided by <module>mod_autoindex</module>.</li>
</ul>
<p>The two functions are separated so that you can completely
remove (or replace) automatic index generation should you want
to.</p>
<p>A "trailing slash" redirect is issued when the server
receives a request for a URL
<code>dirname</code> is a directory. Directories require a
trailing slash, so <module>mod_dir</module> issues a redirect to
</summary>
<directivesynopsis>
<name>DirectoryIndex</name>
<description>List of resources to look for when the client requests
a directory</description>
<syntax>DirectoryIndex
<var>local-url</var> [<var>local-url</var>] ...</syntax>
<contextlist><context>server config</context><context>virtual host</context>
<context>directory</context><context>.htaccess</context></contextlist>
<override>Indexes</override>
<usage>
<p>The <directive>DirectoryIndex</directive> 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. <var>Local-url</var> 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 <code>Indexes</code> option is
set, the server will generate its own listing of the
directory.</p>
<example><title>Example</title>
DirectoryIndex index.html
</example>
exists, or would list the directory if it did not.</p>
<p>Note that the documents do not need to be relative to the
directory;</p>
<example>
</example>
existed in a directory.</p>
</usage>
</directivesynopsis>
</modulesynopsis>