0N/A<!
DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
0N/A<
TITLE>Apache module mod_autoindex</
TITLE>
2362N/A<!-- Background white, links blue (unvisited), navy (visited), red (active) --> 0N/A<
H1 ALIGN="CENTER">Module mod_autoindex</
H1>
0N/AThe module mod_autoindex generates directory indexes, automatically, similar to
0N/Athe Unix <
em>ls</
em> command or the Win32 <
em>dir</
em> shell command.
2362N/AAutomatic index generation must be enabled with by the <
CODE>Options</
CODE>
2362N/Adirective's <
CODE><
I>[+]</
I>Indexes</
CODE> option. See the
0N/A<
A HREF="core.html#options"><
CODE>Options</
CODE></
a> directive for
0N/A><
STRONG>Status:</
STRONG></
A> Base
0N/A><
STRONG>Module Identifier:</
STRONG></
A> autoindex_module
0N/AThe index of a directory can come from one of two sources:
0N/A<
LI>A file written by the user, typically called <
CODE>
index.html</
CODE>.
0N/Athe name of this file.
0N/A<
LI>Otherwise, a listing generated by the server. The other directives
775N/Acontrol the format of this listing. The <
A HREF="#addicon">AddIcon</
A>,
0N/A<
A HREF="#addiconbyencoding">AddIconByEncoding</
A> and
0N/A<
A HREF="#addiconbytype">AddIconByType</
A> are used to set a list of
0N/Aicons to display for various file types; for each file listed, the
0N/Afirst icon listed that matches the file is displayed. These
0N/Aare controlled by <
CODE>mod_autoindex</
CODE>.
0N/AThe two functions are separated so that you can completely remove
0N/A(or replace) automatic index generation should you want to.
0N/AAutomatic index generation is enabled with using
0N/A<
CODE>Options +Indexes</
CODE>. See the
0N/A<
A HREF="core.html#options"><
CODE>Options</
CODE></
a> directive for
0N/AIf the <
SAMP><
A HREF="#indexoptions:fancyindexing">FancyIndexing</
A></
SAMP>
0N/Aoption is given with the <
A HREF="#indexoptions"><
SAMP>IndexOptions</
SAMP></
A>
0N/Adirective, the column headers are links that control the
0N/Aorder of the display. If you select a header link, the
0N/Alisting will be regenerated, sorted by the values in that
0N/Acolumn. Selecting the same header repeatedly toggles
0N/Abetween ascending and descending order. These column header links are
0N/Asuppressed with <
A HREF="#indexoptions">IndexOptions</
A> directive's
0N/A<
SAMP>SuppressColumnSorting</
SAMP> option.
0N/ANote that when the display is sorted by "Size",
0N/Ait's the <
EM>actual</
EM> size of the files that's used,
0N/Anot the displayed value - so a 1010-byte file will
1221N/Aalways be displayed before a 1011-byte file (if in ascending
1221N/Aorder) even though they both are shown as "1K".
1221N/A<
H2>Autoindex Request Query Arguments</
H2>
1221N/A<
P>Apache 2.0.23 reorganized the Query Arguments for Column Sorting, and introduced
0N/Aan entire group of new query options. To effectively eliminate all client control
0N/Aover the output, the <
SAMP><
A HREF="#indexoptions:ignoreclient">IndexOptions
0N/AIgnoreClient</
A></
SAMP> option was introduced.</
P>
0N/A<
P>The column sorting headers themselves are self-referencing hyperlinks that add the
0N/Asort query options shown below. Any option below may be added to any request for the
0N/A<
li><
SAMP>C=N</
SAMP> sorts the directory by file name
0N/A<
li><
SAMP>C=M</
SAMP> sorts the directory by last-modified date, then file name
0N/A<
li><
SAMP>C=S</
SAMP> sorts the directory by size, then file name
0N/A<
li><
SAMP>C=D</
SAMP> sorts the directory by description, then file name<
br />
0N/A<
li><
SAMP>O=A</
SAMP> sorts the listing in Ascending Order
0N/A<
li><
SAMP>O=D</
SAMP> sorts the listing in Descending Order<
br />
0N/A<
li><
SAMP>F=0</
SAMP> formats the listing as a simple list (not FancyIndexed)
0N/A<
li><
SAMP>F=1</
SAMP> formats the listing as a FancyIndexed list
0N/A<
li><
SAMP>F=2</
SAMP> formats the listing as an HTMLTable FancyIndexed list<
br />
0N/A<
li><
SAMP>V=0</
SAMP> disables version sorting
0N/A<
li><
SAMP>V=0</
SAMP> enables version sorting<
br />
0N/A<
li><
SAMP>P=<
EM>pattern</
EM></
SAMP> lists only files matching the given <
EM>pattern</
EM>
0N/A<
P>Note that the 'P'attern query argument is tested <
em>after</
em> the usual IndexIgnore
0N/Adirectives are processed, and all file names are still subjected to the same critera
0N/Aas any other autoindex listing. The Query Arguments parser in mod_autoindex will stop
0N/Aabruptly when an unrecognized option is encountered. The Query Arguments must be well
0N/Aformed, according to the table above.</
P>
0N/A<
P>The simple example below, which can be clipped and saved in a
header.html file,
0N/Aillustrates these query options. Note that the unknown "X" argument, for the
0N/Asubmit button, is listed last to assure the arguments are all parsed before
0N/Amod_autoindex encounters the X=Go input.</
P>
0N/A<
pre><FORM METHOD="GET">
0N/A Show me a <SELECT NAME="F">
0N/A <OPTION VALUE="0"> Plain list
0N/A <OPTION VALUE="1" SELECTED> Fancy list
0N/A <OPTION VALUE="2"> Table list
0N/A Sorted by <SELECT NAME="C">
0N/A <OPTION VALUE="N" SELECTED> Name
0N/A <OPTION VALUE="M"> Date Modified
0N/A <OPTION VALUE="S"> Size
0N/A <OPTION VALUE="D"> Description
0N/A <SELECT NAME="O">
0N/A <OPTION VALUE="A" SELECTED> Ascending
1221N/A <OPTION VALUE="D"> Descending
1221N/A <OPTION VALUE="0" SELECTED> in Normal order
1221N/A <OPTION VALUE="1"> in Version order
0N/A Matching <INPUT TYPE="text" NAME="P" VALUE="*">
0N/A <INPUT TYPE="submit" NAME="X" VALUE="Go">
0N/A<
LI><
A HREF="#addalt">AddAlt</
A>
0N/A<
LI><
A HREF="#addaltbyencoding">AddAltByEncoding</
A>
0N/A<
LI><
A HREF="#addaltbytype">AddAltByType</
A>
0N/A<
LI><
A HREF="#adddescription">AddDescription</
A>
0N/A<
LI><
A HREF="#addicon">AddIcon</
A>
0N/A<
LI><
A HREF="#addiconbyencoding">AddIconByEncoding</
A>
0N/A<
LI><
A HREF="#addiconbytype">AddIconByType</
A>
0N/A<
LI><
A HREF="#defaulticon">DefaultIcon</
A>
0N/A<
LI><
A HREF="#headername">HeaderName</
A>
0N/A<
LI><
A HREF="#indexignore">IndexIgnore</
A>
0N/A<
LI><
A HREF="#indexoptions">IndexOptions</
A>
0N/A<
LI><
A HREF="#indexorderdefault">IndexOrderDefault</
A>
0N/A<
LI><
A HREF="#readmename">ReadmeName</
A>
0N/A<
H2><
A NAME="addalt">AddAlt</
A> directive</
H2>
0N/A<!--%plaintext <?INDEX {\tt AddAlt} directive> --> 0N/A><
STRONG>Syntax:</
STRONG></
A> AddAlt <
EM>string file</
em>
0N/A[<
em>file</
em>] ...<
BR>
0N/A><
STRONG>Context:</
STRONG></
A> server config, virtual host, directory,
0N/A><
STRONG>Override:</
STRONG></
A> Indexes<
BR>
0N/A><
STRONG>Status:</
STRONG></
A> Base<
BR>
0N/A><
STRONG>Module:</
STRONG></
A> mod_autoindex<
P>
0N/A<
EM>AddAlt</
EM> provides the alternate text to display for a file, instead of an icon,
0N/Afor <
SAMP><
A HREF="#indexoptions:fancyindexing">FancyIndexing</
A></
SAMP>. <
EM>File</
EM>
0N/Ais a file extension, partial filename, wild-card expression or full filename for
0N/Afiles to describe. <
EM>String</
EM> is enclosed in double quotes (<
CODE>"</
CODE>).
0N/AThis alternate text is displayed if the client is image-incapable, has image loading
0N/Adisabled, or fails to retrieve the icon.
0N/A<
H2><
A NAME="addaltbyencoding">AddAltByEncoding</
A> directive</
H2>
0N/A<!--%plaintext <?INDEX {\tt AddAltByEncoding} directive> --> 2370N/A><
STRONG>Syntax:</
STRONG></
A> AddAltByEncoding <
EM>string MIME-encoding</
em>
2370N/A [<
em>MIME-encoding</
em>] ...<
BR>
0N/A><
STRONG>Context:</
STRONG></
A> server config, virtual host, directory,
0N/A><
STRONG>Override:</
STRONG></
A> Indexes<
BR>
0N/A><
STRONG>Status:</
STRONG></
A> Base<
BR>
0N/A><
STRONG>Module:</
STRONG></
A> mod_autoindex<
P>
0N/A<
EM>AddAltByEncoding</
EM> provides the alternate text to display for a file, instead
0N/Aof an icon, for <
SAMP><
A HREF="#indexoptions:fancyindexing">FancyIndexing</
A></
SAMP>.
0N/A<
EM>MIME-encoding</
EM> is a valid content-encoding, such as <
SAMP>x-compress</
SAMP>.
0N/A<
EM>String</
EM> is enclosed in double quotes (<
CODE>"</
CODE>). This alternate
0N/Atext is displayed if the client is image-incapable, has image loading disabled, or
0N/Afails to retrieve the icon.
0N/A<
H2><
A NAME="addaltbytype">AddAltByType</
A> directive</
H2>
0N/A<!--%plaintext <?INDEX {\tt AddAltByType} directive> --> 0N/A><
STRONG>Syntax:</
STRONG></
A> AddAltByType <
EM>string MIME-type</
em>
2370N/A [<
em>MIME-type</
em>] ...<
BR>
0N/A><
STRONG>Context:</
STRONG></
A> server config, virtual host, directory,
775N/A><
STRONG>Override:</
STRONG></
A> Indexes<
BR>
0N/A><
STRONG>Status:</
STRONG></
A> Base<
BR>
0N/A><
STRONG>Module:</
STRONG></
A> mod_autoindex<
P>
0N/A<
EM>AddAltByType</
EM> sets the alternate text to display for a file, instead of
0N/Aan icon, for <
SAMP><
A HREF="#indexoptions:fancyindexing">FancyIndexing</
A></
SAMP>.
0N/A<
EM>MIME-type</
EM> is a valid content-type, such as <
SAMP>
text/
html</
SAMP>.
0N/A<
EM>String</
EM> is enclosed in double quotes (<
CODE>"</
CODE>). This
0N/Aalternate text is displayed if the client is image-incapable, has image loading
0N/Adisabled, or fails to retrieve the icon.
775N/A<
H2><
A NAME="adddescription">AddDescription</
A> directive</
H2>
775N/A<!--%plaintext <?INDEX {\tt AddDescription} directive> --> 775N/A><
STRONG>Syntax:</
STRONG></
A> AddDescription <
EM>string file</
em>
775N/A [<
em>file</
em>] ...<
BR>
0N/A><
STRONG>Context:</
STRONG></
A> server config, virtual host, directory,
0N/A><
STRONG>Override:</
STRONG></
A> Indexes<
BR>
0N/A><
STRONG>Status:</
STRONG></
A> Base<
BR>
0N/A><
STRONG>Module:</
STRONG></
A> mod_autoindex<
P>
0N/AThis sets the description to display for a file, for
0N/A<
SAMP><
A HREF="#indexoptions:fancyindexing">FancyIndexing</
A></
SAMP>.
0N/A<
EM>File</
EM> is a file extension, partial filename, wild-card expression
0N/Aor full filename for files to describe. <
EM>String</
EM> is enclosed in double
0N/Aquotes (<
CODE>"</
CODE>). Example:
0N/AThe typical, default description field is 23 bytes wide. 6 more bytes are
0N/Aadded by the <
CODE>IndexOptions SuppressIcon</
CODE> option, 7 bytes are
0N/Aadded by the <
CODE>IndexOptions SuppressSize</
CODE> option, and 19 bytes
0N/Aare added by the <
CODE>IndexOptions SuppressLastModified</
CODE> option.
0N/ATherefore, the widest default the description column is ever assigned is 55 bytes.
0N/ASee the <
a href="#indexoptions:descriptionwidth">DescriptionWidth</
a>
0N/A<
samp>IndexOptions</
samp> keyword for details on overriding the size of this
0N/Acolumn, or allowing descriptions of unlimited length.
0N/A<
b>Caution:</
b> Descriptive text defined with <
samp>AddDescription</
samp>
0N/Amay contain HTML markup, such as tags and character entities. If the
0N/Awidth of the description column should happen to truncate a tagged
0N/Aelement (such as cutting off the end of a bolded phrase), the results
0N/Amay affect the rest of the directory listing.
0N/A<
H2><
A NAME="addicon">AddIcon</
A> directive</
H2>
0N/A<!--%plaintext <?INDEX {\tt AddIcon} directive> --> 0N/A><
STRONG>Syntax:</
STRONG></
A> AddIcon <
EM>icon name</
em>
0N/A [<
em>name</
em>] ...</
EM><
BR>
0N/A><
STRONG>Context:</
STRONG></
A> server config, virtual host, directory,
0N/A><
STRONG>Override:</
STRONG></
A> Indexes<
BR>
0N/A><
STRONG>Status:</
STRONG></
A> Base<
BR>
0N/A><
STRONG>Module:</
STRONG></
A> mod_autoindex<
P>
0N/AThis sets the icon to display next to a file ending in <
EM>name</
EM> for
0N/A<
SAMP><
A HREF="#indexoptions:fancyindexing">FancyIndexing</
A></
SAMP>. <
EM>Icon</
EM>
0N/Ais either a (%-escaped) relative URL to the icon, or of the format
0N/A(<
EM>alttext</
EM>,<
EM>url</
EM>) where <
EM>alttext</
EM> is the text tag given
0N/Afor an icon for non-graphical browsers.<
P>
0N/A<
EM>Name</
EM> is either ^^DIRECTORY^^ for directories, ^^BLANKICON^^ for
0N/Ablank lines (to format the list correctly), a file extension, a wildcard
0N/Aexpression, a partial filename or a complete filename. Examples:
0N/A<
A HREF="#addiconbytype">AddIconByType</
A> should be used in preference to
0N/AAddIcon, when possible.<
P><
HR>
0N/A<
H2><
A NAME="addiconbyencoding">AddIconByEncoding</
A> directive</
H2>
0N/A<!--%plaintext <?INDEX {\tt AddIconByEncoding} directive> --> 0N/A><
STRONG>Syntax:</
STRONG></
A> AddIconByEncoding <
EM>icon MIME-encoding</
em>
0N/A [<
em>MIME-encoding</
em>] ...<
BR>
0N/A><
STRONG>Context:</
STRONG></
A> server config, virtual host, directory,
0N/A><
STRONG>Override:</
STRONG></
A> Indexes<
BR>
0N/A><
STRONG>Status:</
STRONG></
A> Base<
BR>
1884N/A><
STRONG>Module:</
STRONG></
A> mod_autoindex<
P>
0N/AThis sets the icon to display next to files with
0N/A<
SAMP><
A HREF="#indexoptions:fancyindexing">FancyIndexing</
A></
SAMP>.
0N/A<
EM>Icon</
EM> is either a (%-escaped) relative URL to the icon, or of the
0N/Aformat (<
EM>alttext</
EM>,<
EM>url</
EM>) where <
EM>alttext</
EM> is the text tag
0N/Agiven for an icon for non-graphical browsers.<
P>
0N/A<
EM>Mime-encoding</
EM> is a wildcard expression matching required the
0N/Acontent-encoding. Examples:
0N/A</
CODE></
BLOCKQUOTE><
P><
HR>
0N/A<
H2><
A NAME="addiconbytype">AddIconByType</
A> directive</
H2>
0N/A<!--%plaintext <?INDEX {\tt AddIconByType} directive> --> 0N/A><
STRONG>Syntax:</
STRONG></
A> AddIconByType <
EM>icon MIME-type</
em>
0N/A [<
em>MIME-type</
em>] ...<
BR>
0N/A><
STRONG>Context:</
STRONG></
A> server config, virtual host, directory,
0N/A><
STRONG>Override:</
STRONG></
A> Indexes<
BR>
0N/A><
STRONG>Status:</
STRONG></
A> Base<
BR>
0N/A><
STRONG>Module:</
STRONG></
A> mod_autoindex<
P>
0N/AThis sets the icon to display next to files of type <
EM>MIME-type</
EM> for
0N/A<
SAMP><
A HREF="#indexoptions:fancyindexing">FancyIndexing</
A></
SAMP>. <
EM>Icon</
EM>
0N/Ais either a (%-escaped) relative URL to the icon, or of the format
2370N/A(<
EM>alttext</
EM>,<
EM>url</
EM>) where <
EM>alttext</
EM> is the text tag given
2370N/Afor an icon for non-graphical browsers.<
P>
2370N/A<
EM>Mime-type</
EM> is a wildcard expression matching required the mime types.
0N/A</
CODE></
BLOCKQUOTE><
P><
HR>
0N/A<
H2><
A NAME="defaulticon">DefaultIcon</
A> directive</
H2>
0N/A<!--%plaintext <?INDEX {\tt DefaultIcon} directive> --> 0N/A><
STRONG>Syntax:</
STRONG></
A> DefaultIcon <
EM>url</
EM><
BR>
0N/A><
STRONG>Context:</
STRONG></
A> server config, virtual host, directory,
0N/A><
STRONG>Override:</
STRONG></
A> Indexes<
BR>
0N/A><
STRONG>Status:</
STRONG></
A> Base<
BR>
0N/A><
STRONG>Module:</
STRONG></
A> mod_autoindex<
P>
0N/AThe DefaultIcon directive sets the icon to display for files when no
0N/Aspecific icon is known, for
0N/A<
SAMP><
A HREF="#indexoptions:fancyindexing">FancyIndexing</
A></
SAMP>.
0N/A<
EM>Url</
EM> is a (%-escaped) relative URL to the icon. Examples:
0N/A</
CODE></
BLOCKQUOTE><
P><
HR>
0N/A<
H2><
A NAME="fancyindexing">FancyIndexing</
A> directive</
H2>
0N/A<!--%plaintext <?INDEX {\tt FancyIndexing} directive> --> 0N/A><
STRONG>Deprecated:</
STRONG></
A> See <
A HREF="#indexoptions">IndexOptions</
A>
0N/A <
SAMP><
A HREF="#indexoptions:fancyindexing">FancyIndexing</
A></
SAMP><
BR>
0N/AThe FancyIndexing directive was replaced by the
0N/A<
SAMP><
A HREF="#indexoptions:fancyindexing">FancyIndexing</
A></
SAMP> option to the
0N/A<
A HREF="#indexoptions">IndexOptions</
A> directive, and is no longer supported
0N/A<
H2><
A NAME="headername">HeaderName</
A> directive</
H2>
0N/A<!--%plaintext <?INDEX {\tt HeaderName} directive> --> 0N/A><
STRONG>Syntax:</
STRONG></
A> HeaderName <
EM>filename</
EM><
BR>
0N/A><
STRONG>Context:</
STRONG></
A> server config, virtual host, directory,
0N/A><
STRONG>Override:</
STRONG></
A> Indexes<
BR>
0N/A><
STRONG>Status:</
STRONG></
A> Base<
BR>
0N/A><
STRONG>Module:</
STRONG></
A> mod_autoindex
1221N/A ><
STRONG>Compatibility:</
STRONG></
A> behavior changed in version 1.3.7;
1221N/AThe HeaderName directive sets the name of the file that will be inserted
1221N/Aat the top of the index listing. <
EM>Filename</
EM> is the name of the file
0N/A<
BLOCKQUOTE><
STRONG>Changes with Apache 1.3.7:</
STRONG>
0N/ABoth HeaderName and <
A HREF="#readmename">ReadmeName</
A> now treat <
EM>Filename</
EM>
0N/Aas a URI path relative to the one used to access the directory being indexed.
0N/A<
EM>Filename</
EM> must resolve to a document with a major content type of
0N/A<
EM>etc.</
EM>). This means that <
EM>filename</
EM> may refer to a CGI script if the
0N/Ascript's actual file type (as opposed to its output) is marked as
0N/Awill be performed if the <
SAMP>MultiViews</
SAMP>
0N/AIf <
EM>filename</
EM> resolves to a static <
SAMP>
text/
html</
SAMP> document
0N/A(not a CGI script) and the
0N/A<
SAMP>Includes</
SAMP> <
A HREF="core.html#options">option</
A> is enabled,
0N/Athe file will be processed for server-side includes (see the
0N/ASee also <
A HREF="#readmename">ReadmeName</
A>.
1221N/A<
H2><
A NAME="indexignore">IndexIgnore</
A> directive</
H2>
1221N/A<!--%plaintext <?INDEX {\tt IndexIgnore} directive> --> 1221N/A><
STRONG>Syntax:</
STRONG></
A> IndexIgnore <
EM>file</
em> [<
em>file</
em>] ...<
BR>
1221N/A><
STRONG>Context:</
STRONG></
A> server config, virtual host, directory,
1221N/A><
STRONG>Override:</
STRONG></
A> Indexes<
BR>
0N/A><
STRONG>Status:</
STRONG></
A> Base<
BR>
0N/A><
STRONG>Module:</
STRONG></
A> mod_autoindex<
P>
0N/AThe IndexIgnore directive adds to the list of files to hide when listing
0N/Aa directory. <
EM>File</
EM> is a file extension, partial filename,
0N/Awildcard expression or full filename for files to ignore. Multiple
0N/AIndexIgnore directives add to the list, rather than the replacing the list
0N/Aof ignored files. By default, the list contains `<
CODE>.</
CODE>'. Example:
0N/AIndexIgnore README .htaccess *~
0N/A</
CODE></
BLOCKQUOTE><
P><
HR>
0N/A<
H2><
A NAME="indexoptions">IndexOptions</
A> directive</
H2>
0N/A<!--%plaintext <?INDEX {\tt IndexOptions} directive> --> 0N/A><
STRONG>Syntax:</
STRONG></
A> IndexOptions [+|-]<
em>option</
em>
0N/A [[+|-]<
em>option</
em>] ... (Apache 1.3.3 and later)
0N/A><
STRONG>Context:</
STRONG></
A> server config, virtual host, directory,
0N/A><
STRONG>Override:</
STRONG></
A> Indexes<
BR>
0N/A><
STRONG>Status:</
STRONG></
A> Base<
BR>
0N/A><
STRONG>Module:</
STRONG></
A> mod_autoindex
0N/A><
STRONG>Compatibility:</
STRONG></
A> '+/-' syntax and merging of multiple
0N/A <
SAMP>IndexOptions</
SAMP> directives is only available with
0N/A Apache 1.3.3 and later; specific options are listed below.
0N/AThe IndexOptions directive specifies the behavior of the directory indexing.
0N/A<
EM>Option</
EM> can be one of
0N/A<
dt><
a name="indexoptions:descriptionwidth">DescriptionWidth=[<
em>n</
em> | *]
0N/A (<
em>Apache 1.3.10 or 2.0.23 and later</
em>)</
a></
dt>
0N/A<
dd>The <
samp>DescriptionWidth</
samp> keyword allows you to specify the
0N/Awidth of the description column in characters.</
dd>
0N/A<
dd><
samp>-DescriptionWidth</
samp> (or unset) allows mod_autoindex to calculate
0N/A<
dd><
samp>DescriptionWidth=n</
samp> fixes the column width to n bytes wide.</
dd>
0N/A<
dd><
samp>DescriptionWidth=*</
samp> grows the column to the necessary width.</
dd>
0N/A<
dd><
b>See the section on <
a href="#adddescription"><
samp>AddDescription</
samp></
a>
0N/Afor dangers inherent in truncating descriptions.</
b></
dd>
0N/A<
DT><
A NAME="indexoptions:fancyindexing">FancyIndexing</
A>
0N/A<
DD>
<!--%plaintext <?INDEX {\tt FancyIndexing} index option> --> 0N/AThis turns on fancy indexing of directories.
0N/A<
dt><
a name="indexoptions:foldersfirst">FoldersFirst
0N/A (<
i>Apache 1.3.10 or 2.0.23 and later</
i>)</
a></
dt>
0N/AIf this option is enabled, subdirectory listings
0N/Awill <
i>always</
i> appear first, followed by normal files in the
0N/Adirectory. The listing is basically broken into two components,
0N/Athe files and the subdirectories, and each is sorted separately and
0N/Athen displayed subdirectories-first. For instance, if the sort order
0N/Ais descending by name, and <
samp>FoldersFirst</
samp> is enabled,
0N/Asubdirectory <
samp>Zed</
samp> will be listed before subdirectory
0N/A<
samp>Beta</
samp>, which will be listed before normal files
0N/A<
samp>Gamma</
samp> and <
samp>Alpha</
samp>.
0N/A<
b>This option only has an effect if
0N/A<
a href="#indexoptions:fancyindexing"><
samp>FancyIndexing</
samp></
a>
0N/Ais also enabled.</
b></
dd>
0N/A<
DT><
A NAME="indexoptions:htmltable">HTMLTable</
A>
0N/A <
i>(Experimental, Apache 2.0.23 and later)</
i>
0N/A<
DD>
<!--%plaintext <?INDEX {\tt HTMLTable} index option> --> 0N/AThis experimental option with FancyIndexing constructs a simple table for the
0N/Afancy directory listing. Note this will confuse older browsers. It is particularly
0N/Anecessary if file names or description text will alternate between left-to-right
0N/Aand right-to-left reading order, as can happen on WinNT or other utf-8
0N/A<
DT><
A NAME="indexoptions:iconsarelinks">IconsAreLinks</
A>
0N/A<!--%plaintext <?INDEX {\tt IconsAreLinks} index option> --> 0N/AThis makes the icons part of the anchor for the filename, for
0N/A<
DT><
A NAME="indexoptions:iconheight">IconHeight[=pixels] (<
EM>Apache 1.3 and later</
EM>)</
A>
0N/A<!--%plaintext <?INDEX {\tt IconHeight} index option> --> 0N/APresence of this option, when used with IconWidth, will cause the server
0N/Ato include <
SAMP>HEIGHT</
SAMP> and <
SAMP>WIDTH</
SAMP> attributes in the
0N/A<
SAMP>IMG</
SAMP> tag for the file icon. This allows browser to
0N/Aprecalculate the page layout without having to wait until all the
0N/Aimages have been loaded. If no value is given for the option, it
0N/Adefaults to the standard height of the icons supplied with the Apache
0N/A<
DT><
A NAME="indexoptions:iconwidth">IconWidth[=pixels] (<
EM>Apache 1.3 and later</
EM>)</
A>
0N/A<!--%plaintext <?INDEX {\tt IconWidth} index option> --> 0N/APresence of this option, when used with IconHeight, will cause the server
0N/Ato include <
SAMP>HEIGHT</
SAMP> and <
SAMP>WIDTH</
SAMP> attributes in the
0N/A<
SAMP>IMG</
SAMP> tag for the file icon. This allows browser to
0N/Aprecalculate the page layout without having to wait until all the
0N/Aimages have been loaded. If no value is given for the option, it
0N/Adefaults to the standard width of the icons supplied with the Apache
0N/A<
DT><
A NAME="indexoptions:ignoreclient">IgnoreClient</
A>
0N/A<!--%plaintext <?INDEX {\tt IgnoreClient} index option> --> 0N/AThis option causes mod_autoindex to ignore all query variables from the
0N/Aclient, including sort order (implies <
EM><
A 0N/A HREF="#indexoptions:suppresscolumnsorting">SuppressColumnSorting</
A></
EM>.)
0N/A<
DT><
A NAME="indexoptions:namewidth">NameWidth=[<
EM>n</
EM> | *] (<
EM>Apache 1.3.2 and later</
EM>)</
A>
0N/AThe NameWidth keyword allows you to specify the width of the
0N/Afilename column in bytes.
0N/A<
dd><
samp>-NameWidth</
samp> (or unset) allows mod_autoindex to calculate
0N/A<
dd><
samp>NameWidth=n</
samp> fixes the column width to n bytes wide.</
dd>
0N/A<
dd><
samp>NameWidth=*</
samp> grows the column to the necessary width.</
dd>
0N/A<
DT><
A NAME="indexoptions:scanhtmltitles">ScanHTMLTitles</
A>
0N/A<
DD>
<!--%plaintext <?INDEX {\tt ScanHTMLTitles} index option> --> 0N/AThis enables the extraction of the title from HTML documents for fancy
0N/Aindexing. If the file does not have a description given by
0N/A<
A HREF="#adddescription">AddDescription</
A> then httpd will read the
0N/Adocument for the value of the TITLE tag. This is CPU and disk intensive.
0N/A<
DT><
A NAME="indexoptions:suppresscolumnsorting">SuppressColumnSorting</
A>
0N/A (<
EM>Apache 1.3 and later</
EM>)
0N/A<!--%plaintext <?INDEX {\tt SuppressColumnSorting} index option> --> 0N/AIf specified, Apache will not make the column headings in a FancyIndexed
0N/Adirectory listing into links for sorting. The default behaviour is
0N/Afor them to be links; selecting the column heading will sort the directory
0N/Alisting by the values in that column. <
STRONG>Prior to Apache 2.0.23, this
0N/Aalso disabled parsing the Query Arguments for the sort string.</
STRONG>
0N/AThat behavior is now controled by <
A HREF="#indexoptions:ignoreclient" 0N/A >IndexOptions IgnoreClient</
A> in Apache 2.0.23.
0N/A<
DT><
A NAME="indexoptions:suppressdescription">SuppressDescription</
A>
0N/A<!--%plaintext <?INDEX {\tt SuppressDescription} index option> --> 0N/AThis will suppress the file description in fancy indexing listings.
0N/ABy default, files have no descriptions, and so the use of this option
0N/Awill regain 40 characters of screen space to use for something else.
0N/ASee <
A HREF="#adddescription"><
samp>AddDescription</
samp></
A>
0N/Afor information about setting the file description. See also the
0N/AHREF="#indexoptions:descriptionwidth"><
samp>DescriptionWidth</
samp></
A>
0N/Aindex option to limit the size of the description column.
0N/A<
DT><
A NAME="indexoptions:suppresshtmlpreamble">SuppressHTMLPreamble</
A>
0N/A (<
EM>Apache 1.3 and later</
EM>)
0N/A<!--%plaintext <?INDEX {\tt SuppressHTMLPreamble} index option> --> 0N/AIf the directory actually contains a file specified by the
0N/Adirective, the module usually includes the contents of the file
0N/Aafter a standard HTML preamble (<HTML>, <HEAD>, <
EM>et
0N/Acetera</
EM>). The SuppressHTMLPreamble option disables this behaviour,
0N/Acausing the module to start the display with the header file contents.
0N/AThe header file must contain appropriate HTML instructions in this case.
0N/AIf there is no header file, the preamble is generated as usual.
0N/A<
DT><
A NAME="indexoptions:suppressicon">SuppressIcon</
A>
0N/A (<
EM>Apache 2.0.23 and later</
EM>)
0N/A<!--%plaintext <?INDEX {\tt SuppressIcon} index option> --> 0N/AThis will suppress the icon in fancy indexing listings. Combining
0N/Aboth <
EM>SuppressIcon</
EM> and <
EM>SuppressRules</
EM> yeilds proper
0N/AHTML 3.2 output, which by the final specification prohibits IMG and HR
0N/Atags from the PRE block (used to format FancyIndexed listings.)
0N/A<
DT><
A NAME="indexoptions:suppresslastmodified">SuppressLastModified</
A>
0N/A<!--%plaintext <?INDEX {\tt SuppressLastModified} index option> --> 0N/AThis will suppress the display of the last modification date, in fancy
0N/A<
DT><
A NAME="indexoptions:suppressrules">SuppressRules</
A>
0N/A (<
EM>Apache 2.0.23 and later</
EM>)
0N/A<!--%plaintext <?INDEX {\tt SuppressRules} index option> --> 0N/AThis will suppress the horizontal rule lines (HR tags) in directory listings.
0N/ACombining both <
EM>SuppressIcon</
EM> and <
EM>SuppressRules</
EM> yeilds proper
0N/AHTML 3.2 output, which by the final specification prohibits IMG and HR tags
0N/Afrom the PRE block (used to format FancyIndexed listings.)
0N/A<
DT><
A NAME="indexoptions:suppresssize">SuppressSize</
A>
0N/A<!--%plaintext <?INDEX {\tt SuppressSize} index option> --> 0N/AThis will suppress the file size in fancy indexing listings.
0N/A<
DT><
A NAME="indexoptions:trackmodified">TrackModified
0N/A(<
EM>Apache 1.3.15 or 2.0.23 and later</
EM>)</
A>
0N/A<!--%plaintext <?INDEX {\tt TrackModified} index option> --> 0N/AThis returns the Last-Modified and ETag values for the listed directory
0N/Ain the HTTP header. It is only valid if the operating system and file
0N/Asystem return appropriate stat() results. Some Unix systems do so, as
0N/Ado OS2's JFS and Win32's NTFS volumes. OS2 and Win32 FAT volumes,
0N/Afor example, do not. Once this feature is enabled, the client or proxy
0N/Acan track changes to the list of files when they perform a HEAD request.
0N/ANote some operating systems correctly track new and removed files, but
0N/Ado not track changes for sizes or dates of the files within the directory.
0N/A<
STRONG>Changes to the size or date stamp of an existing file will not
0N/Aupdate the Last-Modified header on all Unix platforms.</
STRONG> If this
0N/Ais a concern, leave this option disabled.
0N/A<
DT><
A NAME="indexoptions:versionsort">VersionSort (<
EM>Apache 2.0a3 and later</
EM>)</
A>
0N/AThe VersionSort keyword causes files containing version numbers to
0N/Asort in a natural way. Strings are sorted as usual, except that
0N/Asubstrings of digits in the name and description are compared
0N/Aaccording to their numeric value.
0N/AIf the number starts with a zero, then it is considered to be a
0N/A<
DT><
H3>Incremental IndexOptions</
H3>
0N/A<
DD>Apache 1.3.3 introduced some significant changes in the handling of
0N/A<
SAMP>IndexOptions</
SAMP> directives. In particular,
0N/A <
LI>Multiple <
SAMP>IndexOptions</
SAMP> directives for a single
0N/A directory are now merged together. The result of the example above
0N/A will now be the equivalent of
0N/A <
CODE>IndexOptions FancyIndexing ScanHTMLTitles</
CODE>.
0N/A <
LI>The addition of the incremental syntax (<
EM>
i.e.</
EM>, prefixing
0N/A keywords with '+' or '-').
0N/AWhenever a '+' or '-' prefixed keyword is encountered, it is applied
0N/Ato the current <
SAMP>IndexOptions</
SAMP> settings (which may have been
0N/Ainherited from an upper-level directory). However, whenever an unprefixed
0N/Akeyword is processed, it clears all inherited options and any incremental
0N/Asettings encountered so far. Consider the following example:
0N/A<
BLOCKQUOTE><
CODE>IndexOptions +ScanHTMLTitles -IconsAreLinks FancyIndexing
0N/AIndexOptions +SuppressSize
0N/AThe net effect is equivalent to
0N/A<
CODE>IndexOptions FancyIndexing +SuppressSize</
CODE>, because
0N/Athe unprefixed <
CODE>FancyIndexing</
CODE> discarded the incremental
0N/Akeywords before it, but allowed them to start accumulating again
To unconditionally set the <
CODE>IndexOptions</
CODE> for a
particular directory, clearing the inherited settings, specify
keywords without any '+' or '-' prefixes.
<
H2><
A NAME="indexorderdefault">IndexOrderDefault</
A> directive</
H2>
<!--%plaintext <?INDEX {\tt IndexOrderDefault} directive> --> ><
STRONG>Syntax:</
STRONG></
A> IndexOrderDefault
Ascending|Descending Name|Date|Size|Description
><
STRONG>Context:</
STRONG></
A> server config, virtual host, directory,
><
STRONG>Override:</
STRONG></
A> Indexes
><
STRONG>Status:</
STRONG></
A> Base
><
STRONG>Module:</
STRONG></
A> mod_autoindex
><
STRONG>Compatibility:</
STRONG></
A> IndexOrderDefault is only available in
The <
SAMP>IndexOrderDefault</
SAMP> directive is used in combination with
the <
A HREF="#indexoptions:fancyindexing"><
SAMP>FancyIndexing</
SAMP></
A>
index option. By default, fancyindexed directory listings are displayed
in ascending order by filename; the <
SAMP>IndexOrderDefault</
SAMP> allows
you to change this initial display order.
<
SAMP>IndexOrderDefault</
SAMP> takes two arguments. The first must be either
<
SAMP>Ascending</
SAMP> or <
SAMP>Descending</
SAMP>, indicating the direction
of the sort. The second argument must be one of the keywords
<
SAMP>Name</
SAMP>, <
SAMP>Date</
SAMP>, <
SAMP>Size</
SAMP>, or
<
SAMP>Description</
SAMP>, and identifies the primary key. The secondary
key is <
EM>always</
EM> the ascending filename.
You can force a directory listing to only be displayed in a particular
order by combining this directive with the
<
A HREF="#indexoptions:suppresscolumnsorting"><
SAMP>SuppressColumnSorting</
SAMP></
A> index option; this will prevent
the client from requesting the directory listing in a different order.
<
H2><
A NAME="readmename">ReadmeName</
A> directive</
H2>
<!--%plaintext <?INDEX {\tt ReadmeName} directive> --> ><
STRONG>Syntax:</
STRONG></
A> ReadmeName <
EM>filename</
EM><
BR>
><
STRONG>Context:</
STRONG></
A> server config, virtual host, directory,
><
STRONG>Override:</
STRONG></
A> Indexes<
BR>
><
STRONG>Status:</
STRONG></
A> Base<
BR>
><
STRONG>Module:</
STRONG></
A> mod_autoindex
><
STRONG>Compatibility:</
STRONG></
A> some features only available after
1.3.6; see <
A HREF="#headername">HeaderName</
A>
The ReadmeName directive sets the name of the file that will be appended
to the end of the index listing. <
EM>Filename</
EM> is the name of the file
to include, and is taken to be relative to the location being indexed.
<
P>See also <
A HREF="#headername">HeaderName</
A>, where this behavior is
described in greater detail.<
P>