mod_autoindex.html revision e15efb65133619d06600dc277d340e8101a2f443
71da3cca78eea6010f89b139ecadb79e6d213c4fnd<!--#include virtual="header.html" -->
71da3cca78eea6010f89b139ecadb79e6d213c4fndThis module is contained in the <code>mod_dir.c</code> file, and
71da3cca78eea6010f89b139ecadb79e6d213c4fndis compiled in by default. It provides for directory indexing.
b0fb330a8581c8bfab5e523084f9f39264a52b12gsteinThis module controls the directory indexing. The index of a directory
f4c310fd2555c6faca1f980f00b161eadb089023gsteincan come from one of two sources:
49f1aab8b6762ee5b4afdb3a9cc48e7c00435dd3striker<li>A file written by the user, typically called <code>index.html</code>.
49f1aab8b6762ee5b4afdb3a9cc48e7c00435dd3strikerThe <A HREF="#directoryindex">DirectoryIndex</A> directive sets the name
49f1aab8b6762ee5b4afdb3a9cc48e7c00435dd3strikerof this file.
49f1aab8b6762ee5b4afdb3a9cc48e7c00435dd3striker<li>Otherwise, a listing generated by the server. The other directives
49f1aab8b6762ee5b4afdb3a9cc48e7c00435dd3strikercontrol the format of this listing. The <A HREF="#addicon">AddIcon</A>,
49f1aab8b6762ee5b4afdb3a9cc48e7c00435dd3striker<A HREF="#addiconbyencoding">AddIconByEncoding</A> and
49f1aab8b6762ee5b4afdb3a9cc48e7c00435dd3striker<A HREF="#addiconbytype">AddIconByType</A> are used to set a list of
49f1aab8b6762ee5b4afdb3a9cc48e7c00435dd3strikericons to display for various file types; for each file listed, the
49f1aab8b6762ee5b4afdb3a9cc48e7c00435dd3strikerfirst icon listed that matches the file is displayed.
49f1aab8b6762ee5b4afdb3a9cc48e7c00435dd3striker<li><A HREF="#addiconbyencoding">AddIconByEncoding</A>
f4c310fd2555c6faca1f980f00b161eadb089023gstein<!--%plaintext <?INDEX {\tt AddAlt} directive> -->
f4c310fd2555c6faca1f980f00b161eadb089023gstein<strong>Syntax:</strong> AddAlt <em>string file file...</em><br>
f4c310fd2555c6faca1f980f00b161eadb089023gstein<Strong>Context:</strong> server config, virtual host, directory, .htaccess<br>
f4c310fd2555c6faca1f980f00b161eadb089023gsteinThis sets the alternate text to display for a file, instead of an icon, for
f4c310fd2555c6faca1f980f00b161eadb089023gstein<A HREF="#fancyindexing">FancyIndexing</A>. <em>File</em> is a file
f4c310fd2555c6faca1f980f00b161eadb089023gsteinextension, partial filename, wild-card expression or full filename for files
f4c310fd2555c6faca1f980f00b161eadb089023gsteinto describe. <em>String</em> is enclosed in double quotes
847b3922f7dcde6830f4aad49d29c84b4569c260minfrin(<code>"</code>). This alternate text is displayed if the client is
847b3922f7dcde6830f4aad49d29c84b4569c260minfrinimage-incapable or has image loading disabled.
000397350b42c6266351bd618fa07df929fa7c79gstein<A name="addaltbyencoding"><h2>AddAltByEncoding</h2></A>
000397350b42c6266351bd618fa07df929fa7c79gstein<!--%plaintext <?INDEX {\tt AddAltByEncoding} directive> -->
5ca401d5a2dd63d75464895dc2a6ea292b62fd99gstein<strong>Syntax:</strong> AddAltByEncoding <em>string MIME-encoding
5ca401d5a2dd63d75464895dc2a6ea292b62fd99gstein<Strong>Context:</strong> server config, virtual host, directory, .htaccess<br>
f4c310fd2555c6faca1f980f00b161eadb089023gsteinThis sets the alternate text to display for a file, instead of an icon, for
f4c310fd2555c6faca1f980f00b161eadb089023gstein<A HREF="#fancyindexing">FancyIndexing</A>. <em>MIME-encoding</em> is a
f4c310fd2555c6faca1f980f00b161eadb089023gsteinvalid content-encoding, such as <SAMP>x-compress</SAMP>.
f4c310fd2555c6faca1f980f00b161eadb089023gstein(<code>"</code>). This alternate text is displayed if the client is
f4c310fd2555c6faca1f980f00b161eadb089023gsteinimage-incapable or has image loading disabled.
f4c310fd2555c6faca1f980f00b161eadb089023gstein<!--%plaintext <?INDEX {\tt AddAltByType} directive> -->
f4c310fd2555c6faca1f980f00b161eadb089023gstein<strong>Syntax:</strong> AddAltByType <em>string MIME-type MIME-type...</em><br>
f4c310fd2555c6faca1f980f00b161eadb089023gstein<Strong>Context:</strong> server config, virtual host, directory, .htaccess<br>
b47464a901075041e800be2de098a603923fa4f9gsteinThis sets the alternate text to display for a file, instead of an icon, for
f4c310fd2555c6faca1f980f00b161eadb089023gstein<A HREF="#fancyindexing">FancyIndexing</A>. <em>MIME-type</em> is a
f4c310fd2555c6faca1f980f00b161eadb089023gstein(<code>"</code>). This alternate text is displayed if the client is
49f1aab8b6762ee5b4afdb3a9cc48e7c00435dd3strikerimage-incapable or has image loading disabled.
f4c310fd2555c6faca1f980f00b161eadb089023gstein<!--%plaintext <?INDEX {\tt AddDescription} directive> -->
ef3c32d4a7accb38368c7b9face2ade88d987a8bgstein<strong>Syntax:</strong> AddDescription <em>string file file...</em><br>
ef3c32d4a7accb38368c7b9face2ade88d987a8bgstein<Strong>Context:</strong> server config, virtual host, directory, .htaccess<br>
ef3c32d4a7accb38368c7b9face2ade88d987a8bgsteinThis sets the description to display for a file, for
ef3c32d4a7accb38368c7b9face2ade88d987a8bgstein<A HREF="#fancyindexing">FancyIndexing</A>. <em>File</em> is a file
5a9667916c79d8c699b069068e5570aa1c331c80gsteinextension, partial filename, wild-card expression or full filename for files
9d0665da83d1e22c0ea0e5f6f940f70f75bf5237ianhto describe. <em>String</em> is enclosed in double quotes
f4c310fd2555c6faca1f980f00b161eadb089023gstein<blockquote><code>AddDescription "The planet Mars" /web/pics/mars.gif
ef3c32d4a7accb38368c7b9face2ade88d987a8bgstein<!--%plaintext <?INDEX {\tt AddIcon} directive> -->
67ec15681c83d4f5e119f0742618569017beb3fbstriker<strong>Syntax:</strong> AddIcon <em>icon name name ...</em><br>
ef3c32d4a7accb38368c7b9face2ade88d987a8bgstein<Strong>Context:</strong> server config, virtual host, directory, .htaccess<br>
f4c310fd2555c6faca1f980f00b161eadb089023gsteinThis sets the icon to display next to a file ending in <em>name</em> for
1ccd992d37d62c8cb2056126f2234f64ec189bfddougm<A HREF="#fancyindexing">FancyIndexing</A>. <em>Icon</em> is either a
f4c310fd2555c6faca1f980f00b161eadb089023gstein(%-escaped) relative URL to the icon, or of the format
f4c310fd2555c6faca1f980f00b161eadb089023gstein(<em>alttext</em>,<em>url</em>) where <em>alttext</em> is the text tag given
f4c310fd2555c6faca1f980f00b161eadb089023gsteinfor an icon for non-graphical browsers.<p>
f4c310fd2555c6faca1f980f00b161eadb089023gstein<em>Name</em> is either ^^DIRECTORY^^ for directories, ^^BLANKICON^^ for
b47464a901075041e800be2de098a603923fa4f9gsteinblank lines (to format the list correctly), a file extension, a wildcard
f4c310fd2555c6faca1f980f00b161eadb089023gsteinexpression, a partial filename or a complete filename. Examples:
b47464a901075041e800be2de098a603923fa4f9gstein<A HREF="#addiconbytype">AddIconByType</A> should be used in preference to
f4c310fd2555c6faca1f980f00b161eadb089023gstein<A name="addiconbyencoding"><h2>AddIconByEncoding</h2></A>
f4c310fd2555c6faca1f980f00b161eadb089023gstein<!--%plaintext <?INDEX {\tt AddIconByEncoding} directive> -->
49f1aab8b6762ee5b4afdb3a9cc48e7c00435dd3striker<strong>Syntax:</strong> AddIconByEncoding <em>icon mime-encoding mime-encoding
b47464a901075041e800be2de098a603923fa4f9gstein<Strong>Context:</strong> server config, virtual host, directory, .htaccess<br>
1ccd992d37d62c8cb2056126f2234f64ec189bfddougmThis sets the icon to display next to files with
f4c310fd2555c6faca1f980f00b161eadb089023gstein<em>mime-encoding</em> for <A HREF="#fancyindexing">FancyIndexing</A>.
f4c310fd2555c6faca1f980f00b161eadb089023gstein<em>Icon</em> is either a (%-escaped) relative URL to the icon, or of the
f4c310fd2555c6faca1f980f00b161eadb089023gsteinformat (<em>alttext</em>,<em>url</em>) where <em>alttext</em> is the text tag
f4c310fd2555c6faca1f980f00b161eadb089023gsteingiven for an icon for non-graphical browsers.<p>
49f1aab8b6762ee5b4afdb3a9cc48e7c00435dd3striker<em>Mime-encoding</em> is a wildcard expression matching required the
de18a9e85398b9c79c422f578633ed56c2747bbbgsteincontent-encoding. Examples:
3c290fd0361d6d9d84d97725eaf299456bddd6cfsf<!--%plaintext <?INDEX {\tt AddIconByType} directive> -->
3c290fd0361d6d9d84d97725eaf299456bddd6cfsf<strong>Syntax:</strong> AddIconByType <em>icon mime-type mime-type ...</em><br>
de18a9e85398b9c79c422f578633ed56c2747bbbgstein<Strong>Context:</strong> server config, virtual host, directory, .htaccess<br>
f4c310fd2555c6faca1f980f00b161eadb089023gsteinThis sets the icon to display next to files of type <em>mime-type</em> for
f4c310fd2555c6faca1f980f00b161eadb089023gstein<A HREF="#fancyindexing">FancyIndexing</A>. <em>Icon</em> is either a
f4c310fd2555c6faca1f980f00b161eadb089023gstein(%-escaped) relative URL to the icon, or of the format
1ccd992d37d62c8cb2056126f2234f64ec189bfddougm(<em>alttext</em>,<em>url</em>) where <em>alttext</em> is the text tag given
f4c310fd2555c6faca1f980f00b161eadb089023gsteinfor an icon for non-graphical browsers.<p>
f4c310fd2555c6faca1f980f00b161eadb089023gstein<em>Mime-type</em> is a wildcard expression matching required the mime types.
de18a9e85398b9c79c422f578633ed56c2747bbbgstein<!--%plaintext <?INDEX {\tt DefaultIcon} directive> -->
9f18c80269be35c0b5653e84b0db0a24044722c4gstein<Strong>Context:</strong> server config, virtual host, directory, .htaccess<br>
000397350b42c6266351bd618fa07df929fa7c79gsteinThe DefaultIcon directive sets the icon to display for files when no
9f18c80269be35c0b5653e84b0db0a24044722c4gsteinspecific icon is known, for <A HREF="#fancyindexing">FancyIndexing</A>.
9f18c80269be35c0b5653e84b0db0a24044722c4gstein<em>Url</em> is a (%-escaped) relative URL to the icon. Examples:
000397350b42c6266351bd618fa07df929fa7c79gstein<!--%plaintext <?INDEX {\tt DirectoryIndex} directive> -->
f4c310fd2555c6faca1f980f00b161eadb089023gstein<strong>Syntax:</strong> DirectoryIndex <em>local-url local-url ...</em><br>
f4c310fd2555c6faca1f980f00b161eadb089023gstein<strong>Default:</strong> <code>DirectoryIndex index.html</code><br>
f4c310fd2555c6faca1f980f00b161eadb089023gstein<Strong>Context:</strong> server config, virtual host, directory, .htaccess<br>
f4c310fd2555c6faca1f980f00b161eadb089023gsteinThe DirectoryIndex directive sets the list of resources to look for,
49f1aab8b6762ee5b4afdb3a9cc48e7c00435dd3strikerwhen the client requests an index of the directory by specifying a /
f4c310fd2555c6faca1f980f00b161eadb089023gsteinat the end of the a directory name. <em>Local-url</em> is the
eb2abb2d3f87f28e99bcb282b91e432822b4d9b4gstein(%-encoded) URL of a document on the server relative to the requested
f4c310fd2555c6faca1f980f00b161eadb089023gsteindirectory; it is usually the name of a file in the directory. Several
eb2abb2d3f87f28e99bcb282b91e432822b4d9b4gsteinURLs may be given, in which case the server will return the first one
9f18c80269be35c0b5653e84b0db0a24044722c4gsteinthat it finds. If none of the resources exist and the
9f18c80269be35c0b5653e84b0db0a24044722c4gstein<CODE>Indexes</CODE> option is set, the server will generate its own
eb2abb2d3f87f28e99bcb282b91e432822b4d9b4gsteinlisting of the directory.
f4c310fd2555c6faca1f980f00b161eadb089023gsteinDirectoryIndex index.html
709df1e1c2e1710570f8cb4209497e88662829c3gsteinthen a request for <code>http://myserver/docs/</code> would return
eb2abb2d3f87f28e99bcb282b91e432822b4d9b4gstein<code>http://myserver/docs/index.html</code> if it exists, or would list
eb2abb2d3f87f28e99bcb282b91e432822b4d9b4gsteinthe directory if it did not. <p>
0206c121a68a63559b2e843288e81bcf16093e46jerenkrantzNote that the documents do not need to be relative to the directory;
eb2abb2d3f87f28e99bcb282b91e432822b4d9b4gsteinDirectoryIndex index.html index.txt /cgi-bin/index.pl</code></blockquote>
709df1e1c2e1710570f8cb4209497e88662829c3gsteinwould cause the CGI script <code>/cgi-bin/index.pl</code> to be executed
f4c310fd2555c6faca1f980f00b161eadb089023gsteinif neither <code>index.html</code> or <code>index.txt</code> existed in
f4c310fd2555c6faca1f980f00b161eadb089023gstein<!--%plaintext <?INDEX {\tt FancyIndexing} directive> -->
f4c310fd2555c6faca1f980f00b161eadb089023gstein<strong>Syntax:</strong> FancyIndexing <em>boolean</em><br>
0206c121a68a63559b2e843288e81bcf16093e46jerenkrantz<Strong>Context:</strong> server config, virtual host, directory, .htaccess<br>
0206c121a68a63559b2e843288e81bcf16093e46jerenkrantzThe FancyIndexing directive sets the FancyIndexing option for a directory.
67ec15681c83d4f5e119f0742618569017beb3fbstriker<em>Boolean</em> can be <code>on</code> or <code>off</code>. The
67ec15681c83d4f5e119f0742618569017beb3fbstriker<A HREF="#indexoptions">IndexOptions</A> directive should be used in
000397350b42c6266351bd618fa07df929fa7c79gstein<!--%plaintext <?INDEX {\tt HeaderName} directive> -->
f4c310fd2555c6faca1f980f00b161eadb089023gstein<strong>Syntax:</strong> HeaderName <em>filename</em><br>
000397350b42c6266351bd618fa07df929fa7c79gstein<Strong>Context:</strong> server config, virtual host, directory, .htaccess<br>
49f1aab8b6762ee5b4afdb3a9cc48e7c00435dd3strikerThe HeaderName directive sets the name of the file that will be inserted
000397350b42c6266351bd618fa07df929fa7c79gsteinat the top of the index listing. <em>Filename</em> is the name of the file
000397350b42c6266351bd618fa07df929fa7c79gsteinto include, and is taken to be relative to the directory being indexed.
49f1aab8b6762ee5b4afdb3a9cc48e7c00435dd3strikerThe server first attempts to include <em>filename</em><code>.html</code>
9f18c80269be35c0b5653e84b0db0a24044722c4gsteinas an HTML document, otherwise it will include <em>filename</em> as plain
000397350b42c6266351bd618fa07df929fa7c79gsteintext. Example:
000397350b42c6266351bd618fa07df929fa7c79gstein<blockquote><code>HeaderName HEADER</code></blockquote>
9f18c80269be35c0b5653e84b0db0a24044722c4gsteinwhen indexing the directory <code>/web</code>, the server will first look for
000397350b42c6266351bd618fa07df929fa7c79gsteinthe HTML file <code>/web/HEADER.html</code> and include it if found, otherwise
eb2abb2d3f87f28e99bcb282b91e432822b4d9b4gsteinit will include the plain text file <code>/web/HEADER</code>, if it exists.
9f18c80269be35c0b5653e84b0db0a24044722c4gstein<p>See also <A HREF="#readmename">ReadmeName</A>.<p><hr>
9f18c80269be35c0b5653e84b0db0a24044722c4gstein<!--%plaintext <?INDEX {\tt IndexIgnore} directive> -->
9f18c80269be35c0b5653e84b0db0a24044722c4gstein<strong>Syntax:</strong> IndexIgnore <em>file file ...</em><br>
9f18c80269be35c0b5653e84b0db0a24044722c4gstein<Strong>Context:</strong> server config, virtual host, directory, .htaccess<br>
eb2abb2d3f87f28e99bcb282b91e432822b4d9b4gsteinThe IndexIgnore directive adds to the list of files to hide when listing
000397350b42c6266351bd618fa07df929fa7c79gsteina directory. <em>File</em> is a file extension, partial filename,
f4c310fd2555c6faca1f980f00b161eadb089023gsteinwildcard expression or full filename for files to ignore. Multiple
f4c310fd2555c6faca1f980f00b161eadb089023gsteinIndexIgnore directives add to the list, rather than the replacing the list
f4c310fd2555c6faca1f980f00b161eadb089023gsteinof ignored files. By default, the list contains `<code>.</code>'. Example:
f4c310fd2555c6faca1f980f00b161eadb089023gsteinIndexIgnore README .htaccess *~
f4c310fd2555c6faca1f980f00b161eadb089023gstein<!--%plaintext <?INDEX {\tt IndexOptions} directive> -->
49f1aab8b6762ee5b4afdb3a9cc48e7c00435dd3striker<strong>Syntax:</strong> IndexOptions <em>option option ...</em><br>
f4c310fd2555c6faca1f980f00b161eadb089023gstein<Strong>Context:</strong> server config, virtual host, directory, .htaccess<br>
f4c310fd2555c6faca1f980f00b161eadb089023gsteinThe IndexOptions directive specifies the behavior of the directory indexing.
f4c310fd2555c6faca1f980f00b161eadb089023gstein<dt>FancyIndexing
f4c310fd2555c6faca1f980f00b161eadb089023gstein<dd><!--%plaintext <?INDEX {\tt FancyIndexing} index option> -->
f4c310fd2555c6faca1f980f00b161eadb089023gsteinThis turns on fancy indexing of directories.
f4c310fd2555c6faca1f980f00b161eadb089023gstein<dt>IconsAreLinks
f4c310fd2555c6faca1f980f00b161eadb089023gstein<!--%plaintext <?INDEX {\tt IconsAreLinks} index option> -->
49f1aab8b6762ee5b4afdb3a9cc48e7c00435dd3strikerThis makes the icons part of the anchor for the filename, for
f4c310fd2555c6faca1f980f00b161eadb089023gsteinfancy indexing.
f4c310fd2555c6faca1f980f00b161eadb089023gstein<dt>ScanHTMLTitles
f4c310fd2555c6faca1f980f00b161eadb089023gstein<dd><!--%plaintext <?INDEX {\tt ScanHTMLTitles} index option> -->
f4c310fd2555c6faca1f980f00b161eadb089023gsteinThis enables the extraction of the title from HTML documents for fancy
f4c310fd2555c6faca1f980f00b161eadb089023gsteinindexing. If the file does not have a description given by
f4c310fd2555c6faca1f980f00b161eadb089023gstein<A HREF="#adddescription">AddDescription</A> then httpd will read the
f4c310fd2555c6faca1f980f00b161eadb089023gsteindocument for the value of the TITLE tag. This is CPU and disk intensive.
f4c310fd2555c6faca1f980f00b161eadb089023gstein<dt>SuppressLastModified
f4c310fd2555c6faca1f980f00b161eadb089023gstein<!--%plaintext <?INDEX {\tt SuppressLastModified} index option> -->
f4c310fd2555c6faca1f980f00b161eadb089023gsteinThis will suppress the display of the last modification date, in fancy
f4c310fd2555c6faca1f980f00b161eadb089023gsteinindexing listings.
f4c310fd2555c6faca1f980f00b161eadb089023gstein<dt>SuppressSize
f39230a531b23d94f86a087963299bbe2e431a4agstein<!--%plaintext <?INDEX {\tt SuppressSize} index option> -->
f39230a531b23d94f86a087963299bbe2e431a4agsteinThis will suppress the file size in fancy indexing listings.
f4c310fd2555c6faca1f980f00b161eadb089023gstein<dt>SuppressDescription
f4c310fd2555c6faca1f980f00b161eadb089023gstein<!--%plaintext <?INDEX {\tt SuppressDescription} index option> -->
f4c310fd2555c6faca1f980f00b161eadb089023gsteinThis will suppress the file description in fancy indexing listings.
a1790fb35c4b352dab721370985c623a9f8f5062rpluemThis default is that no options are enabled. If multiple IndexOptions
f4c310fd2555c6faca1f980f00b161eadb089023gsteincould apply to a directory, then the most specific one is taken complete;
f4c310fd2555c6faca1f980f00b161eadb089023gsteinthe options are not merged. For example:
49f1aab8b6762ee5b4afdb3a9cc48e7c00435dd3strikerIndexOptions FancyIndexing <br>
49f1aab8b6762ee5b4afdb3a9cc48e7c00435dd3striker</Directory><br>
49f1aab8b6762ee5b4afdb3a9cc48e7c00435dd3strikerIndexOptions ScanHTMLTitles <br>
f5d88bab65052e00ba37a1af17e5e67a437628b5wrowe</Directory>
f5d88bab65052e00ba37a1af17e5e67a437628b5wrowethen only <code>ScanHTMLTitles</code> will be set for the /web/docs/spec
f4c310fd2555c6faca1f980f00b161eadb089023gstein<!--%plaintext <?INDEX {\tt ReadmeName} directive> -->
f4c310fd2555c6faca1f980f00b161eadb089023gstein<strong>Syntax:</strong> ReadmeName <em>filename</em><br>
f4c310fd2555c6faca1f980f00b161eadb089023gstein<Strong>Context:</strong> server config, virtual host, directory, .htaccess<br>
5b03ba47ff7225cacb131f14b019332af27da960gsteinThe ReadmeName directive sets the name of the file that will be appended
5b03ba47ff7225cacb131f14b019332af27da960gsteinto the end of the index listing. <em>Filename</em> is the name of the file
5b03ba47ff7225cacb131f14b019332af27da960gsteinto include, and is taken to be relative to the directory being indexed.
5b03ba47ff7225cacb131f14b019332af27da960gsteinThe server first attempts to include <em>filename</em><code>.html</code>
49f1aab8b6762ee5b4afdb3a9cc48e7c00435dd3strikeras an HTML document, otherwise it will include <em>filename</em> as plain
5b03ba47ff7225cacb131f14b019332af27da960gsteintext. Example:
5b03ba47ff7225cacb131f14b019332af27da960gstein<blockquote><code>ReadmeName README</code></blockquote>
5b03ba47ff7225cacb131f14b019332af27da960gsteinwhen indexing the directory <code>/web</code>, the server will first look for
5b03ba47ff7225cacb131f14b019332af27da960gsteinthe HTML file <code>/web/README.html</code> and include it if found, otherwise
e0d102c882a7ed34d3eec24b36da49f097066a36stoddardit will include the plain text file <code>/web/README</code>, if it exists.
5b03ba47ff7225cacb131f14b019332af27da960gstein<!--#include virtual="footer.html" -->