mod_dir.html revision 4ed1b0d51faaa03eab8a00036dd0f7a829811adc
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<TITLE>Apache module mod_dir</TITLE>
</HEAD>
<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
<BODY
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#000080"
ALINK="#FF0000"
>
<!--#include virtual="header.html" -->
<H1 ALIGN="CENTER">Module mod_dir</H1>
is compiled in by default. It provides for "trailing slash" redirects and
serving directory index files.
<h2>Summary</h2>
The index of a directory can come from one of two sources:
<ul>
The <A HREF="#directoryindex">DirectoryIndex</A> directive sets
the name of this file.
This is controlled by <code>mod_dir</code>.
<li>Otherwise, a listing generated by the server. This is provided by
</ul>
The two functions are separated so that you can completely remove
(or replace) automatic index generation should you want to.
<p>A "trailing slash" redirect is issued when the server receives a
<SAMP>dirname</SAMP> is a directory. Directories require a trailing
slash, so <code>mod_dir</code> issues a redirect to
<h2>Directives</h2>
<menu>
<li><A HREF="#directoryindex">DirectoryIndex</A>
</menu>
<hr>
<A name="directoryindex"><h2>DirectoryIndex</h2></A>
<!--%plaintext <?INDEX {\tt DirectoryIndex} directive> -->
<strong>Syntax:</strong> DirectoryIndex <em>local-url local-url ...</em><br>
<Strong>Context:</strong> server config, virtual host, directory, .htaccess<br>
<Strong>Override:</strong> Indexes<br>
<strong>Status:</strong> Base<br>
<strong>Module:</strong> mod_dir<p>
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. <em>Local-url</em> 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:
<blockquote><code>
DirectoryIndex index.html
</code></blockquote>
the directory if it did not. <p>
Note that the documents do not need to be relative to the directory;
<blockquote><code>
a directory.<p><hr>
<!--#include virtual="footer.html" -->
</BODY>
</HTML>