mod_autoindex.xml revision f6ece164c2e1055a3d02b10928e1623d18b1d625
d7759bdad133e1e92fe41aab75dd8c1584eda38cjim<?xml version="1.0"?>
d7759bdad133e1e92fe41aab75dd8c1584eda38cjim<!DOCTYPE modulesynopsis SYSTEM "/style/modulesynopsis.dtd">
d7759bdad133e1e92fe41aab75dd8c1584eda38cjim<?xml-stylesheet type="text/xsl" href="/style/manual.en.xsl"?>
4e191199a0aeab09d78df8f5579e745572e8b7bcwsanchez<!-- $LastChangedRevision$ -->
f3a5934ca0fb0f0f813bd9d9d06af8937e3f401fjim
f3a5934ca0fb0f0f813bd9d9d06af8937e3f401fjim<!--
d7759bdad133e1e92fe41aab75dd8c1584eda38cjim Licensed to the Apache Software Foundation (ASF) under one or more
d7759bdad133e1e92fe41aab75dd8c1584eda38cjim contributor license agreements. See the NOTICE file distributed with
d7759bdad133e1e92fe41aab75dd8c1584eda38cjim this work for additional information regarding copyright ownership.
d7759bdad133e1e92fe41aab75dd8c1584eda38cjim The ASF licenses this file to You under the Apache License, Version 2.0
b3155b9e3b06b20030ec6c16d98f8dabf12ead9cianh (the "License"); you may not use this file except in compliance with
b3155b9e3b06b20030ec6c16d98f8dabf12ead9cianh the License. You may obtain a copy of the License at
b3155b9e3b06b20030ec6c16d98f8dabf12ead9cianh
b3155b9e3b06b20030ec6c16d98f8dabf12ead9cianh http://www.apache.org/licenses/LICENSE-2.0
b3155b9e3b06b20030ec6c16d98f8dabf12ead9cianh
b3155b9e3b06b20030ec6c16d98f8dabf12ead9cianh Unless required by applicable law or agreed to in writing, software
b3155b9e3b06b20030ec6c16d98f8dabf12ead9cianh distributed under the License is distributed on an "AS IS" BASIS,
b3155b9e3b06b20030ec6c16d98f8dabf12ead9cianh WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
ff1234e45aca1b8171d711ecb87f58b9d9100a99ianh See the License for the specific language governing permissions and
ff1234e45aca1b8171d711ecb87f58b9d9100a99ianh limitations under the License.
ff1234e45aca1b8171d711ecb87f58b9d9100a99ianh-->
ff1234e45aca1b8171d711ecb87f58b9d9100a99ianh
ff1234e45aca1b8171d711ecb87f58b9d9100a99ianh<modulesynopsis metafile="mod_autoindex.xml.meta">
ff1234e45aca1b8171d711ecb87f58b9d9100a99ianh<name>mod_autoindex</name>
ff1234e45aca1b8171d711ecb87f58b9d9100a99ianh
ff1234e45aca1b8171d711ecb87f58b9d9100a99ianh<description>Generates directory indexes,
b999f6ba2a266bf9a92687f31bb7e76021ac5891ianh automatically, similar to the Unix <code>ls</code> command or the
2ceedfca3a2fdfdb5ff60ca17f030ce91f6331cbwrowe Win32 <code>dir</code> shell command</description>
2ceedfca3a2fdfdb5ff60ca17f030ce91f6331cbwrowe<status>Base</status>
2ceedfca3a2fdfdb5ff60ca17f030ce91f6331cbwrowe<sourcefile>mod_autoindex.c</sourcefile>
2ceedfca3a2fdfdb5ff60ca17f030ce91f6331cbwrowe<identifier>autoindex_module</identifier>
2ceedfca3a2fdfdb5ff60ca17f030ce91f6331cbwrowe
2ceedfca3a2fdfdb5ff60ca17f030ce91f6331cbwrowe<summary>
2ceedfca3a2fdfdb5ff60ca17f030ce91f6331cbwrowe <p>The index of a directory can come from one of two
2ceedfca3a2fdfdb5ff60ca17f030ce91f6331cbwrowe sources:</p>
b999f6ba2a266bf9a92687f31bb7e76021ac5891ianh
2ceedfca3a2fdfdb5ff60ca17f030ce91f6331cbwrowe <ul>
b999f6ba2a266bf9a92687f31bb7e76021ac5891ianh <li>A file written by the user, typically called
7d7931c1f4d46b041ad2ad6fdb9499289063611eianh <code>index.html</code>. The <directive
1f3a44f2fd7f9fee00b80c7ddcf1028ea145f91drbb module="mod_dir">DirectoryIndex</directive> directive sets the
b9b69856aec9ea58ea1b1e5aff669e8eaf2ebce4rbb name of this file. This is controlled by
b9b69856aec9ea58ea1b1e5aff669e8eaf2ebce4rbb <module>mod_dir</module>.</li>
b9b69856aec9ea58ea1b1e5aff669e8eaf2ebce4rbb
1f3a44f2fd7f9fee00b80c7ddcf1028ea145f91drbb <li>Otherwise, a listing generated by the server. The other
1f3a44f2fd7f9fee00b80c7ddcf1028ea145f91drbb directives control the format of this listing. The <directive
1f3a44f2fd7f9fee00b80c7ddcf1028ea145f91drbb module="mod_autoindex">AddIcon</directive>, <directive
7d7931c1f4d46b041ad2ad6fdb9499289063611eianh module="mod_autoindex">AddIconByEncoding</directive> and
1f3a44f2fd7f9fee00b80c7ddcf1028ea145f91drbb <directive module="mod_autoindex">AddIconByType</directive> are
68bcde9c52e9e749482df2800dbdff09559115e0chuck used to set a list of icons to display for various file types;
0c233c76f21b358f4a0d81e0f956339ca727c14cchuck for each file listed, the first icon listed that matches the
43ea154f46345c9722c2b25b2b9f5086ec79eaeeorlikowski file is displayed. These are controlled by
43ea154f46345c9722c2b25b2b9f5086ec79eaeeorlikowski <module>mod_autoindex</module>.</li>
0c233c76f21b358f4a0d81e0f956339ca727c14cchuck </ul>
0c233c76f21b358f4a0d81e0f956339ca727c14cchuck <p>The two functions are separated so that you can completely
0c233c76f21b358f4a0d81e0f956339ca727c14cchuck remove (or replace) automatic index generation should you want
0c233c76f21b358f4a0d81e0f956339ca727c14cchuck to.</p>
0c233c76f21b358f4a0d81e0f956339ca727c14cchuck
0c233c76f21b358f4a0d81e0f956339ca727c14cchuck <p>Automatic index generation is enabled with using
68bcde9c52e9e749482df2800dbdff09559115e0chuck <code>Options +Indexes</code>. See the
53c2eb831bfe47860e3f5ec9190b15cb92f15181chuck <directive module="core">Options</directive> directive for
0c233c76f21b358f4a0d81e0f956339ca727c14cchuck more details.</p>
53c2eb831bfe47860e3f5ec9190b15cb92f15181chuck
c1635d9f723f28fed4b95e5d9693e554a79e8d77orlikowski <p>If the <code><a href="#indexoptions.fancyindexing"
c1635d9f723f28fed4b95e5d9693e554a79e8d77orlikowski >FancyIndexing</a></code> option is given with the <directive
c1635d9f723f28fed4b95e5d9693e554a79e8d77orlikowski module="mod_autoindex">IndexOptions</directive> directive,
c1635d9f723f28fed4b95e5d9693e554a79e8d77orlikowski the column headers are links that control the order of the
c1635d9f723f28fed4b95e5d9693e554a79e8d77orlikowski display. If you select a header link, the listing will be
c1635d9f723f28fed4b95e5d9693e554a79e8d77orlikowski regenerated, sorted by the values in that column. Selecting the
c1635d9f723f28fed4b95e5d9693e554a79e8d77orlikowski same header repeatedly toggles between ascending and descending
4f7dd0949d92462a8adc31eee8aff266eea55204chuck order. These column header links are suppressed with the
4f7dd0949d92462a8adc31eee8aff266eea55204chuck <directive module="mod_autoindex">IndexOptions</directive> directive's
4f7dd0949d92462a8adc31eee8aff266eea55204chuck <code>SuppressColumnSorting</code> option.</p>
4f7dd0949d92462a8adc31eee8aff266eea55204chuck
4f7dd0949d92462a8adc31eee8aff266eea55204chuck <p>Note that when the display is sorted by "Size", it's the
75b3ed55173b29dbdf9e2fb6ec5462bfceee21aechuck <em>actual</em> size of the files that's used, not the
75b3ed55173b29dbdf9e2fb6ec5462bfceee21aechuck displayed value - so a 1010-byte file will always be displayed
75b3ed55173b29dbdf9e2fb6ec5462bfceee21aechuck before a 1011-byte file (if in ascending order) even though
4f7dd0949d92462a8adc31eee8aff266eea55204chuck they both are shown as "1K".</p>
75b3ed55173b29dbdf9e2fb6ec5462bfceee21aechuck</summary>
0c233c76f21b358f4a0d81e0f956339ca727c14cchuck
0c233c76f21b358f4a0d81e0f956339ca727c14cchuck<section id="query">
68bcde9c52e9e749482df2800dbdff09559115e0chuck <title>Autoindex Request Query Arguments</title>
68bcde9c52e9e749482df2800dbdff09559115e0chuck
68bcde9c52e9e749482df2800dbdff09559115e0chuck <p>Apache HTTP Server 2.0.23 reorganized the Query Arguments for Column
68bcde9c52e9e749482df2800dbdff09559115e0chuck Sorting, and introduced an entire group of new query options.
68bcde9c52e9e749482df2800dbdff09559115e0chuck To effectively eliminate all client control over the output,
68bcde9c52e9e749482df2800dbdff09559115e0chuck the <code><a href="#indexoptions.ignoreclient">IndexOptions
68bcde9c52e9e749482df2800dbdff09559115e0chuck IgnoreClient</a></code> option was introduced.</p>
68bcde9c52e9e749482df2800dbdff09559115e0chuck
68bcde9c52e9e749482df2800dbdff09559115e0chuck <p>The column sorting headers themselves are self-referencing
68bcde9c52e9e749482df2800dbdff09559115e0chuck hyperlinks that add the sort query options shown below. Any
68bcde9c52e9e749482df2800dbdff09559115e0chuck option below may be added to any request for the directory
68bcde9c52e9e749482df2800dbdff09559115e0chuck resource.</p>
68bcde9c52e9e749482df2800dbdff09559115e0chuck
68bcde9c52e9e749482df2800dbdff09559115e0chuck <ul>
68bcde9c52e9e749482df2800dbdff09559115e0chuck <li><code>C=N</code> sorts the directory by file name</li>
68bcde9c52e9e749482df2800dbdff09559115e0chuck
68bcde9c52e9e749482df2800dbdff09559115e0chuck <li><code>C=M</code> sorts the directory by last-modified
68bcde9c52e9e749482df2800dbdff09559115e0chuck date, then file name</li>
68bcde9c52e9e749482df2800dbdff09559115e0chuck
68bcde9c52e9e749482df2800dbdff09559115e0chuck <li><code>C=S</code> sorts the directory by size, then file
68bcde9c52e9e749482df2800dbdff09559115e0chuck name</li>
68bcde9c52e9e749482df2800dbdff09559115e0chuck
68bcde9c52e9e749482df2800dbdff09559115e0chuck <li class="separate"><code>C=D</code> sorts the directory by description, then
68bcde9c52e9e749482df2800dbdff09559115e0chuck file name</li>
68bcde9c52e9e749482df2800dbdff09559115e0chuck
68bcde9c52e9e749482df2800dbdff09559115e0chuck <li><code>O=A</code> sorts the listing in Ascending
68bcde9c52e9e749482df2800dbdff09559115e0chuck Order</li>
68bcde9c52e9e749482df2800dbdff09559115e0chuck
68bcde9c52e9e749482df2800dbdff09559115e0chuck <li class="separate"><code>O=D</code> sorts the listing in Descending
68bcde9c52e9e749482df2800dbdff09559115e0chuck Order</li>
68bcde9c52e9e749482df2800dbdff09559115e0chuck
0c233c76f21b358f4a0d81e0f956339ca727c14cchuck <li><code>F=0</code> formats the listing as a simple list
0c233c76f21b358f4a0d81e0f956339ca727c14cchuck (not FancyIndexed)</li>
68bcde9c52e9e749482df2800dbdff09559115e0chuck
68bcde9c52e9e749482df2800dbdff09559115e0chuck <li><code>F=1</code> formats the listing as a FancyIndexed
68bcde9c52e9e749482df2800dbdff09559115e0chuck list</li>
68bcde9c52e9e749482df2800dbdff09559115e0chuck
68bcde9c52e9e749482df2800dbdff09559115e0chuck <li class="separate"><code>F=2</code> formats the listing as an
68bcde9c52e9e749482df2800dbdff09559115e0chuck HTMLTable FancyIndexed list</li>
68bcde9c52e9e749482df2800dbdff09559115e0chuck
68bcde9c52e9e749482df2800dbdff09559115e0chuck <li><code>V=0</code> disables version sorting</li>
68bcde9c52e9e749482df2800dbdff09559115e0chuck
68bcde9c52e9e749482df2800dbdff09559115e0chuck <li class="separate"><code>V=1</code> enables version sorting</li>
68bcde9c52e9e749482df2800dbdff09559115e0chuck
68bcde9c52e9e749482df2800dbdff09559115e0chuck <li><code>P=<var>pattern</var></code> lists only files matching
68bcde9c52e9e749482df2800dbdff09559115e0chuck the given <var>pattern</var></li>
68bcde9c52e9e749482df2800dbdff09559115e0chuck </ul>
68bcde9c52e9e749482df2800dbdff09559115e0chuck
68bcde9c52e9e749482df2800dbdff09559115e0chuck <p>Note that the 'P'attern query argument is tested
68bcde9c52e9e749482df2800dbdff09559115e0chuck <em>after</em> the usual <directive module="mod_autoindex"
68bcde9c52e9e749482df2800dbdff09559115e0chuck >IndexIgnore</directive> directives are processed,
68bcde9c52e9e749482df2800dbdff09559115e0chuck and all file names are still subjected to the same criteria as
68bcde9c52e9e749482df2800dbdff09559115e0chuck any other autoindex listing. The Query Arguments parser in
68bcde9c52e9e749482df2800dbdff09559115e0chuck <module>mod_autoindex</module> will stop abruptly when an unrecognized
68bcde9c52e9e749482df2800dbdff09559115e0chuck option is encountered. The Query Arguments must be well formed,
68bcde9c52e9e749482df2800dbdff09559115e0chuck according to the table above.</p>
68bcde9c52e9e749482df2800dbdff09559115e0chuck
68bcde9c52e9e749482df2800dbdff09559115e0chuck <p>The simple example below, which can be clipped and saved in
68bcde9c52e9e749482df2800dbdff09559115e0chuck a header.html file, illustrates these query options. Note that
0c233c76f21b358f4a0d81e0f956339ca727c14cchuck the unknown "X" argument, for the submit button, is listed last
0c233c76f21b358f4a0d81e0f956339ca727c14cchuck to assure the arguments are all parsed before mod_autoindex
68bcde9c52e9e749482df2800dbdff09559115e0chuck encounters the X=Go input.</p>
68bcde9c52e9e749482df2800dbdff09559115e0chuck
68bcde9c52e9e749482df2800dbdff09559115e0chuck <example>
68bcde9c52e9e749482df2800dbdff09559115e0chuck &lt;form action="" method="get"&gt;<br />
68bcde9c52e9e749482df2800dbdff09559115e0chuck <indent>
68bcde9c52e9e749482df2800dbdff09559115e0chuck Show me a &lt;select name="F"&gt;<br />
68bcde9c52e9e749482df2800dbdff09559115e0chuck <indent>
68bcde9c52e9e749482df2800dbdff09559115e0chuck &lt;option value="0"&gt; Plain list&lt;/option&gt;<br />
68bcde9c52e9e749482df2800dbdff09559115e0chuck &lt;option value="1" selected="selected"&gt; Fancy list&lt;/option&gt;<br />
68bcde9c52e9e749482df2800dbdff09559115e0chuck &lt;option value="2"&gt; Table list&lt;/option&gt;<br />
68bcde9c52e9e749482df2800dbdff09559115e0chuck </indent>
68bcde9c52e9e749482df2800dbdff09559115e0chuck &lt;/select&gt;<br />
68bcde9c52e9e749482df2800dbdff09559115e0chuck Sorted by &lt;select name="C"&gt;<br />
68bcde9c52e9e749482df2800dbdff09559115e0chuck <indent>
68bcde9c52e9e749482df2800dbdff09559115e0chuck &lt;option value="N" selected="selected"&gt; Name&lt;/option&gt;<br />
68bcde9c52e9e749482df2800dbdff09559115e0chuck &lt;option value="M"&gt; Date Modified&lt;/option&gt;<br />
68bcde9c52e9e749482df2800dbdff09559115e0chuck &lt;option value="S"&gt; Size&lt;/option&gt;<br />
0c233c76f21b358f4a0d81e0f956339ca727c14cchuck &lt;option value="D"&gt; Description&lt;/option&gt;<br />
0c233c76f21b358f4a0d81e0f956339ca727c14cchuck </indent>
68bcde9c52e9e749482df2800dbdff09559115e0chuck &lt;/select&gt;<br />
68bcde9c52e9e749482df2800dbdff09559115e0chuck &lt;select name="O"&gt;<br />
68bcde9c52e9e749482df2800dbdff09559115e0chuck <indent>
68bcde9c52e9e749482df2800dbdff09559115e0chuck &lt;option value="A" selected="selected"&gt; Ascending&lt;/option&gt;<br />
68bcde9c52e9e749482df2800dbdff09559115e0chuck &lt;option value="D"&gt; Descending&lt;/option&gt;<br />
68bcde9c52e9e749482df2800dbdff09559115e0chuck </indent>
68bcde9c52e9e749482df2800dbdff09559115e0chuck &lt;/select&gt;<br />
68bcde9c52e9e749482df2800dbdff09559115e0chuck &lt;select name="V"&gt;<br />
68bcde9c52e9e749482df2800dbdff09559115e0chuck <indent>
68bcde9c52e9e749482df2800dbdff09559115e0chuck &lt;option value="0" selected="selected"&gt; in Normal order&lt;/option&gt;<br />
68bcde9c52e9e749482df2800dbdff09559115e0chuck &lt;option value="1"&gt; in Version order&lt;/option&gt;<br />
68bcde9c52e9e749482df2800dbdff09559115e0chuck </indent>
68bcde9c52e9e749482df2800dbdff09559115e0chuck &lt;/select&gt;<br />
68bcde9c52e9e749482df2800dbdff09559115e0chuck Matching &lt;input type="text" name="P" value="*" /&gt;<br />
68bcde9c52e9e749482df2800dbdff09559115e0chuck &lt;input type="submit" name="X" value="Go" /&gt;<br />
68bcde9c52e9e749482df2800dbdff09559115e0chuck </indent>
0c233c76f21b358f4a0d81e0f956339ca727c14cchuck &lt;/form&gt;
0c233c76f21b358f4a0d81e0f956339ca727c14cchuck </example>
68bcde9c52e9e749482df2800dbdff09559115e0chuck
68bcde9c52e9e749482df2800dbdff09559115e0chuck</section>
68bcde9c52e9e749482df2800dbdff09559115e0chuck
68bcde9c52e9e749482df2800dbdff09559115e0chuck<directivesynopsis>
68bcde9c52e9e749482df2800dbdff09559115e0chuck<name>AddAlt</name>
68bcde9c52e9e749482df2800dbdff09559115e0chuck<description>Alternate text to display for a file, instead of an
68bcde9c52e9e749482df2800dbdff09559115e0chuckicon selected by filename</description>
68bcde9c52e9e749482df2800dbdff09559115e0chuck<syntax>AddAlt <var>string</var> <var>file</var> [<var>file</var>] ...</syntax>
68bcde9c52e9e749482df2800dbdff09559115e0chuck<contextlist><context>server config</context><context>virtual host</context>
68bcde9c52e9e749482df2800dbdff09559115e0chuck<context>directory</context><context>.htaccess</context>
68bcde9c52e9e749482df2800dbdff09559115e0chuck</contextlist>
68bcde9c52e9e749482df2800dbdff09559115e0chuck<override>Indexes</override>
68bcde9c52e9e749482df2800dbdff09559115e0chuck
68bcde9c52e9e749482df2800dbdff09559115e0chuck<usage>
68bcde9c52e9e749482df2800dbdff09559115e0chuck <p><directive>AddAlt</directive> provides the alternate text to
68bcde9c52e9e749482df2800dbdff09559115e0chuck display for a file, instead of an icon, for <code><a
68bcde9c52e9e749482df2800dbdff09559115e0chuck href="#indexoptions.fancyindexing">FancyIndexing</a></code>.
68bcde9c52e9e749482df2800dbdff09559115e0chuck <var>File</var> is a file extension, partial filename, wild-card
68bcde9c52e9e749482df2800dbdff09559115e0chuck expression or full filename for files to describe.
68bcde9c52e9e749482df2800dbdff09559115e0chuck If <var>String</var> contains any whitespace, you have to enclose it
68bcde9c52e9e749482df2800dbdff09559115e0chuck in quotes (<code>"</code> or <code>'</code>). This alternate text
68bcde9c52e9e749482df2800dbdff09559115e0chuck is displayed if the client is image-incapable, has image loading
68bcde9c52e9e749482df2800dbdff09559115e0chuck disabled, or fails to retrieve the icon.</p>
68bcde9c52e9e749482df2800dbdff09559115e0chuck
68bcde9c52e9e749482df2800dbdff09559115e0chuck <example><title>Examples</title>
68bcde9c52e9e749482df2800dbdff09559115e0chuck AddAlt "PDF file" *.pdf<br />
68bcde9c52e9e749482df2800dbdff09559115e0chuck AddAlt Compressed *.gz *.zip *.Z
68bcde9c52e9e749482df2800dbdff09559115e0chuck </example>
68bcde9c52e9e749482df2800dbdff09559115e0chuck</usage>
68bcde9c52e9e749482df2800dbdff09559115e0chuck</directivesynopsis>
68bcde9c52e9e749482df2800dbdff09559115e0chuck
68bcde9c52e9e749482df2800dbdff09559115e0chuck<directivesynopsis>
0c233c76f21b358f4a0d81e0f956339ca727c14cchuck<name>AddAltByEncoding</name>
68bcde9c52e9e749482df2800dbdff09559115e0chuck<description>Alternate text to display for a file instead of an icon
68bcde9c52e9e749482df2800dbdff09559115e0chuckselected by MIME-encoding</description>
4f7dd0949d92462a8adc31eee8aff266eea55204chuck<syntax>AddAltByEncoding <var>string</var> <var>MIME-encoding</var>
4f7dd0949d92462a8adc31eee8aff266eea55204chuck[<var>MIME-encoding</var>] ...</syntax>
68bcde9c52e9e749482df2800dbdff09559115e0chuck<contextlist><context>server config</context><context>virtual host</context>
4f7dd0949d92462a8adc31eee8aff266eea55204chuck<context>directory</context><context>.htaccess</context>
4f7dd0949d92462a8adc31eee8aff266eea55204chuck</contextlist>
68bcde9c52e9e749482df2800dbdff09559115e0chuck<override>Indexes</override>
4f7dd0949d92462a8adc31eee8aff266eea55204chuck
4f7dd0949d92462a8adc31eee8aff266eea55204chuck<usage>
68bcde9c52e9e749482df2800dbdff09559115e0chuck <p><directive>AddAltByEncoding</directive> provides the alternate
text to display for a file, instead of an icon, for <code><a
href="#indexoptions.fancyindexing">FancyIndexing</a></code>.
<var>MIME-encoding</var> is a valid content-encoding, such as
<code>x-compress</code>. If <var>String</var> contains any whitespace,
you have to enclose it in quotes (<code>"</code> or <code>'</code>).
This alternate text is displayed if the client is image-incapable,
has image loading disabled, or fails to retrieve the icon.</p>
<example><title>Example</title>
AddAltByEncoding gzip x-gzip
</example>
</usage>
</directivesynopsis>
<directivesynopsis>
<name>AddAltByType</name>
<description>Alternate text to display for a file, instead of an
icon selected by MIME content-type</description>
<syntax>AddAltByType <var>string</var> <var>MIME-type</var>
[<var>MIME-type</var>] ...</syntax>
<contextlist><context>server config</context><context>virtual host</context>
<context>directory</context><context>.htaccess</context>
</contextlist>
<override>Indexes</override>
<usage>
<p><directive>AddAltByType</directive> sets the alternate text to
display for a file, instead of an icon, for <code><a
href="#indexoptions.fancyindexing">FancyIndexing</a></code>.
<var>MIME-type</var> is a valid content-type, such as
<code>text/html</code>. If <var>String</var> contains any whitespace,
you have to enclose it in quotes (<code>"</code> or <code>'</code>).
This alternate text is displayed if the client is image-incapable,
has image loading disabled, or fails to retrieve the icon.</p>
<example><title>Example</title>
AddAltByType 'plain text' text/plain
</example>
</usage>
</directivesynopsis>
<directivesynopsis>
<name>AddDescription</name>
<description>Description to display for a file</description>
<syntax>AddDescription <var>string file</var> [<var>file</var>] ...</syntax>
<contextlist><context>server config</context><context>virtual host</context>
<context>directory</context><context>.htaccess</context>
</contextlist>
<override>Indexes</override>
<usage>
<p>This sets the description to display for a file, for
<code><a href="#indexoptions.fancyindexing"
>FancyIndexing</a></code>.
<var>File</var> is a file extension, partial filename, wild-card
expression or full filename for files to describe.
<var>String</var> is enclosed in double quotes (<code>"</code>).</p>
<example><title>Example</title>
AddDescription "The planet Mars" /web/pics/mars.gif
</example>
<p>The typical, default description field is 23 bytes wide. 6
more bytes are added by the <code><a href="#indexoptions.suppressicon"
>IndexOptions SuppressIcon</a></code> option, 7 bytes are
added by the <code><a href="#indexoptions.suppresssize"
>IndexOptions SuppressSize</a></code> option, and 19 bytes are
added by the <code><a href="#indexoptions.suppresslastmodified"
>IndexOptions SuppressLastModified</a></code> option.
Therefore, the widest default the description column is ever
assigned is 55 bytes.</p>
<p>Since the <var>File</var> argument may be a partial file name,
please remember that a too-short partial filename may match
unintended files. For example, <code>le.html</code> will match the
file <code>le.html</code> but will also match the file
<code>example.html</code>. In the event that there may be ambiguity,
use as complete a filename as you can, but keep in mind that the
first match encountered will be used, and order your list of
<code>AddDescription</code> directives accordingly.</p>
<p>See the <a href="#indexoptions.descriptionwidth"
>DescriptionWidth</a> <directive module="mod_autoindex"
>IndexOptions</directive> keyword for details on overriding the size
of this column, or allowing descriptions of unlimited length.</p>
<note><title>Caution</title>
<p>Descriptive text defined with <directive>AddDescription</directive>
may contain HTML markup, such as tags and character entities. If the
width of the description column should happen to truncate a tagged
element (such as cutting off the end of a bolded phrase), the
results may affect the rest of the directory listing.</p>
</note>
</usage>
</directivesynopsis>
<directivesynopsis>
<name>AddIcon</name>
<description>Icon to display for a file selected by name</description>
<syntax>AddIcon <var>icon</var> <var>name</var> [<var>name</var>]
...</syntax>
<contextlist><context>server config</context><context>virtual host</context>
<context>directory</context><context>.htaccess</context>
</contextlist>
<override>Indexes</override>
<usage>
<p>This sets the icon to display next to a file ending in
<var>name</var> for <code><a href="#indexoptions.fancyindexing"
>FancyIndexing</a></code>. <var>Icon</var> is either a (%-escaped)
relative URL to the icon, a fully qualified remote URL, or of the format <code>
(<var>alttext</var>,<var>url</var>)</code> where <var>alttext</var>
is the text tag given for an icon for non-graphical browsers.</p>
<p><var>Name</var> is either <code>^^DIRECTORY^^</code> for directories,
<code>^^BLANKICON^^</code> for blank lines (to format the list
correctly), a file extension, a wildcard expression, a partial
filename or a complete filename.</p>
<p><code>^^BLANKICON^^</code> is only used for formatting, and so
is unnecessary if you're using <code>IndexOptions
HTMLTable</code>.</p>
<example><title>Examples</title>
AddIcon (IMG,/icons/image.png) .gif .jpg .png<br />
AddIcon /icons/dir.png ^^DIRECTORY^^<br />
AddIcon /icons/backup.png *~
</example>
<p><directive module="mod_autoindex">AddIconByType</directive>
should be used in preference to <directive>AddIcon</directive>,
when possible.</p>
</usage>
</directivesynopsis>
<directivesynopsis>
<name>AddIconByEncoding</name>
<description>Icon to display next to files selected by MIME
content-encoding</description>
<syntax>AddIconByEncoding <var>icon</var> <var>MIME-encoding</var>
[<var>MIME-encoding</var>] ...</syntax>
<contextlist><context>server config</context><context>virtual host</context>
<context>directory</context><context>.htaccess</context>
</contextlist>
<override>Indexes</override>
<usage>
<p>This sets the icon to display next to files with <code><a
href="#indexoptions.fancyindexing">FancyIndexing</a></code>.
<var>Icon</var> is either a (%-escaped) relative URL to the icon,
a fully qualified remote URL,
or of the format <code>(<var>alttext</var>,<var>url</var>)</code>
where <var>alttext</var> is the text tag given for an icon for
non-graphical browsers.</p>
<p><var>MIME-encoding</var> is a valid content-encoding, such as
<code>x-compress</code>.</p>
<example><title>Example</title>
AddIconByEncoding /icons/compress.png x-compress
</example>
</usage>
</directivesynopsis>
<directivesynopsis>
<name>AddIconByType</name>
<description>Icon to display next to files selected by MIME
content-type</description>
<syntax>AddIconByType <var>icon</var> <var>MIME-type</var>
[<var>MIME-type</var>] ...</syntax>
<contextlist><context>server config</context><context>virtual host</context>
<context>directory</context><context>.htaccess</context>
</contextlist>
<override>Indexes</override>
<usage>
<p>This sets the icon to display next to files of type
<var>MIME-type</var> for <code><a
href="#indexoptions.fancyindexing">FancyIndexing</a></code>.
<var>Icon</var> is either a (%-escaped) relative URL to the icon,
a fully qualified remote URL,
or of the format <code>(<var>alttext</var>,<var>url</var>)</code>
where <var>alttext</var> is the text tag given for an icon for
non-graphical browsers.</p>
<p><var>MIME-type</var> is a wildcard expression matching
required the mime types.</p>
<example><title>Example</title>
AddIconByType (IMG,/icons/image.png) image/*
</example>
</usage>
</directivesynopsis>
<directivesynopsis>
<name>DefaultIcon</name>
<description>Icon to display for files when no specific icon is
configured</description>
<syntax>DefaultIcon <var>url-path</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>DefaultIcon</directive> directive sets the icon
to display for files when no specific icon is known, for <code><a
href="#indexoptions.fancyindexing">FancyIndexing</a></code>.
<var>Url-path</var> is a (%-escaped) relative URL to the icon,
or a fully qualified remote URL.</p>
<example><title>Example</title>
DefaultIcon /icon/unknown.png
</example>
</usage>
</directivesynopsis>
<directivesynopsis>
<name>HeaderName</name>
<description>Name of the file that will be inserted at the top
of the index listing</description>
<syntax>HeaderName <var>filename</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>HeaderName</directive> directive sets the name
of the file that will be inserted at the top of the index
listing. <var>Filename</var> is the name of the file to include.</p>
<example><title>Example</title>
HeaderName HEADER.html
</example>
<note>
<p>Both HeaderName and <directive
module="mod_autoindex">ReadmeName</directive> now treat
<var>Filename</var> as a URI path relative to the one used to
access the directory being indexed. If <var>Filename</var> begins
with a slash, it will be taken to be relative to the <directive
module="core">DocumentRoot</directive>.</p>
<example><title>Example</title>
HeaderName /include/HEADER.html
</example>
<p><var>Filename</var> must resolve to a document with a major
content type of <code>text/*</code> (<em>e.g.</em>,
<code>text/html</code>, <code>text/plain</code>, etc.). This means
that <var>filename</var> may refer to a CGI script if the script's
actual file type (as opposed to its output) is marked as
<code>text/html</code> such as with a directive like:</p>
<example>
AddType text/html .cgi
</example>
<p><a href="/content-negotiation.html">Content negotiation</a>
will be performed if <directive module="core">Options</directive>
<code>MultiViews</code> is in effect. If <var>filename</var> resolves
to a static <code>text/html</code> document (not a CGI script) and
either one of the <directive module="core">options</directive>
<code>Includes</code> or <code>IncludesNOEXEC</code> is enabled,
the file will be processed for server-side includes (see the
<module>mod_include</module> documentation).</p>
</note>
<p>If the file specified by <directive>HeaderName</directive> contains
the beginnings of an HTML document (&lt;html&gt;, &lt;head&gt;, etc.)
then you will probably want to set <a
href="#indexoptions.suppresshtmlpreamble"><code>IndexOptions
+SuppressHTMLPreamble</code></a>, so that these tags are not
repeated.</p>
</usage>
</directivesynopsis>
<directivesynopsis>
<name>IndexIgnore</name>
<description>Adds to the list of files to hide when listing
a directory</description>
<syntax>IndexIgnore <var>file</var> [<var>file</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>IndexIgnore</directive> directive adds to the
list of files to hide when listing a directory. <var>File</var> is a
shell-style wildcard expression or full
filename. Multiple IndexIgnore directives add
to the list, rather than the replacing the list of ignored
files. By default, the list contains <code>.</code> (the current
directory).</p>
<example>
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
</example>
</usage>
</directivesynopsis>
<directivesynopsis>
<name>IndexIgnoreReset</name>
<description>Empties the list of files to hide when listing
a directory</description>
<syntax>IndexIgnoreReset ON|OFF</syntax>
<contextlist><context>server config</context><context>virtual host</context>
<context>directory</context><context>.htaccess</context>
</contextlist>
<override>Indexes</override>
<compatibility>2.3.10 and later</compatibility>
<usage>
<p>The <directive>IndexIgnoreReset</directive> directive removes
any files ignored by <directive>IndexIgnore</directive> otherwise
inherited from other configuration sections. </p>
<example>
&lt;Directory /var/www&gt;
IndexIgnore *.bak .??* *~ *# HEADER* README* RCS CVS *,v *,t
&lt;/Directory&gt;
&lt;Directory /var/www/backups&gt;
IndexIgnoreReset ON
IndexIgnore .??* *# HEADER* README* RCS CVS *,v *,t
&lt;/Directory&gt;
</example>
<note type="warning"><p> Review the default configuration for a list of
patterns that you might want to explicitly ignore after using this
directive.</p></note>
</usage>
</directivesynopsis>
<directivesynopsis>
<name>IndexOptions</name>
<description>Various configuration settings for directory
indexing</description>
<syntax>IndexOptions [+|-]<var>option</var> [[+|-]<var>option</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>IndexOptions</directive> directive specifies the
behavior of the directory indexing. <var>Option</var> can be one
of</p>
<dl>
<dt><a name="indexoptions.addaltclass"
id="indexoptions.addaltclass">AddAltClass</a></dt>
<dd>Adds an additional CSS class declaration to each row of the
directory listing table when <code>IndexOptions HTMLTable</code>
is in effect and an <code>IndexStyleSheet</code> is defined.
Rather than the standard <code>even</code> and <code>odd</code>
classes that would otherwise be applied to each row of the table,
a class of <code>even-<em>ALT</em></code> or
<code>odd-<em>ALT</em></code> where <em>ALT</em> is either the
standard alt text associated with the file style (eg. <em>snd</em>,
<em>txt</em>, <em>img</em>, etc) or the alt text defined by one of
the various <code>AddAlt*</code> directives.
</dd>
<dt><a name="indexoptions.charset"
id="indexoptions.charset"
>Charset=<var>character-set</var></a> (<em>Apache HTTP Server 2.0.61 and
later</em>)</dt>
<dd>The <code>Charset</code> keyword allows you to
specify the character set of the generated page. The
default is <code>UTF-8</code> on Windows and Mac OS X,
and <code>ISO-8859-1</code> elsewhere.
(It depends on whether the underlying file system
uses Unicode filenames or not.)
<example><title>Example:</title>
IndexOptions Charset=UTF-8
</example>
</dd>
<dt><a name="indexoptions.descriptionwidth"
id="indexoptions.descriptionwidth"
>DescriptionWidth=[<var>n</var> | *]</a> (<em>Apache HTTP Server 2.0.23 and
later</em>)</dt>
<dd>The <code>DescriptionWidth</code> keyword allows you to
specify the width of the description column in
characters.</dd>
<dd><code>-DescriptionWidth</code> (or unset) allows
<module>mod_autoindex</module> to calculate the best width.</dd>
<dd><code>DescriptionWidth=<var>n</var></code> fixes the column width to
<var>n</var> bytes wide.</dd>
<dd><code>DescriptionWidth=*</code> grows the column to the
width necessary to accommodate the longest description
string.</dd>
<dd><strong>See the section on <directive
module="mod_autoindex">AddDescription</directive> for dangers
inherent in truncating descriptions.</strong></dd>
<dt><a name="indexoptions.fancyindexing"
id="indexoptions.fancyindexing">FancyIndexing</a></dt>
<dd>This turns on fancy indexing of directories.</dd>
<dt><a name="indexoptions.foldersfirst"
id="indexoptions.foldersfirst">FoldersFirst</a> (<em>Apache HTTP Server
2.0.23 and later</em>)</dt>
<dd>If this option is enabled, subdirectory listings will
<em>always</em> appear first, followed by normal files in the
directory. The listing is basically broken into two
components, the files and the subdirectories, and each is
sorted separately and then displayed subdirectories-first.
For instance, if the sort order is descending by name, and
<code>FoldersFirst</code> is enabled, subdirectory
<code>Zed</code> will be listed before subdirectory
<code>Beta</code>, which will be listed before normal files
<code>Gamma</code> and <code>Alpha</code>. <strong>This option
only has an effect if <a href="#indexoptions.fancyindexing"
><code>FancyIndexing</code></a> is also enabled.</strong></dd>
<dt><a name="indexoptions.htmltable"
id="indexoptions.htmltable">HTMLTable</a> (<em>Apache
HTTP Server 2.0.23 and later</em>)</dt>
<dd>This option with <code>FancyIndexing</code> constructs
a simple table for the fancy directory listing.
It is necessary for utf-8 enabled platforms or if file
names or description text will alternate between
left-to-right and right-to-left reading order.</dd>
<dt><a name="indexoptions.iconsarelinks"
id="indexoptions.iconsarelinks">IconsAreLinks</a></dt>
<dd>This makes the icons part of the anchor for the filename, for
fancy indexing.</dd>
<dt><a name="indexoptions.iconheight"
id="indexoptions.iconheight">IconHeight[=<var
>pixels</var>]</a></dt>
<dd>Presence of this option, when used with <code>IconWidth</code>,
will cause the server to include <code>height</code> and
<code>width</code> attributes in the <code>img</code> tag for the file
icon. This allows browser to precalculate the page layout without having
to wait until all the images have been loaded. If no value is given for
the option, it defaults to the standard height of the icons supplied
with the Apache httpd software.</dd>
<dt><a name="indexoptions.iconwidth"
id="indexoptions.iconwidth">IconWidth[=<var
>pixels</var>]</a></dt>
<dd>Presence of this option, when used with <code>IconHeight</code>,
will cause the server to include <code>height</code> and
<code>width</code> attributes in the <code>img</code> tag for
the file icon. This allows browser to precalculate the page
layout without having to wait until all the images have been
loaded. If no value is given for the option, it defaults to
the standard width of the icons supplied with the Apache httpd
software.</dd>
<dt><a name="indexoptions.ignorecase"
id="indexoptions.ignorecase">IgnoreCase</a></dt>
<dd>If this option is enabled, names are sorted in a case-insensitive
manner. For instance, if the sort order is ascending by name, and
<code>IgnoreCase</code> is enabled, file Zeta will be listed after
file alfa (Note: file GAMMA will always be listed before file gamma).
</dd>
<dt><a name="indexoptions.ignoreclient"
id="indexoptions.ignoreclient">IgnoreClient</a></dt>
<dd>This option causes <module>mod_autoindex</module> to ignore all
query variables from the client, including sort order (implies
<code><a href="#indexoptions.suppresscolumnsorting"
>SuppressColumnSorting</a></code>.)</dd>
<dt><a name="indexoptions.namewidth"
id="indexoptions.namewidth">NameWidth=[<var>n</var>
| *]</a></dt>
<dd>The <code>NameWidth</code> keyword allows you to specify the width
of the filename column in bytes.</dd>
<dd><code>-NameWidth</code> (or unset) allows <module
>mod_autoindex</module> to calculate the best width, but only up
to 20 bytes wide.</dd>
<dd><code>NameWidth=<var>n</var></code> fixes the column width to
<var>n</var> bytes wide.</dd>
<dd><code>NameWidth=*</code> grows the column to the necessary
width.</dd>
<dt><a name="indexoptions.scanhtmltitles"
id="indexoptions.scanhtmltitles">ScanHTMLTitles</a></dt>
<dd>This enables the extraction of the title from HTML documents
for fancy indexing. If the file does not have a description
given by <directive module="mod_autoindex">AddDescription</directive>
then httpd will read the document for the value of the
<code>title</code> element. This is CPU and disk intensive.</dd>
<dt><a name="indexoptions.showforbidden"
id="indexoptions.showforbidden">ShowForbidden</a></dt>
<dd>If specified, Apache httpd will show files normally hidden because
the subrequest returned <code>HTTP_UNAUTHORIZED</code> or
<code>HTTP_FORBIDDEN</code></dd>
<dt><a name="indexoptions.suppresscolumnsorting"
id="indexoptions.suppresscolumnsorting"
>SuppressColumnSorting</a></dt>
<dd>If specified, Apache httpd will not make the column headings in a
FancyIndexed directory listing into links for sorting. The
default behavior is for them to be links; selecting the
column heading will sort the directory listing by the values
in that column. <strong>Prior to Apache HTTP Server 2.0.23, this also
disabled parsing the Query Arguments for the sort
string.</strong> That behavior is now controlled by <a
href="#indexoptions.ignoreclient"><code>IndexOptions
IgnoreClient</code></a> in Apache HTTP Server 2.0.23.</dd>
<dt><a name="indexoptions.suppressdescription"
id="indexoptions.suppressdescription"
>SuppressDescription</a></dt>
<dd>This will suppress the file description in fancy indexing
listings. By default, no file descriptions are defined, and
so the use of this option will regain 23 characters of screen
space to use for something else. See <directive module="mod_autoindex"
>AddDescription</directive> for information about setting the file
description. See also the <code><a
href="#indexoptions.descriptionwidth">DescriptionWidth</a></code>
index option to limit the size of the description column.</dd>
<dt><a name="indexoptions.suppresshtmlpreamble"
id="indexoptions.suppresshtmlpreamble"
>SuppressHTMLPreamble</a></dt>
<dd>If the directory actually contains a file specified by the
<directive module="mod_autoindex">HeaderName</directive>
directive, the module usually includes the contents of the file
after a standard HTML preamble (<code>&lt;html&gt;</code>,
<code>&lt;head&gt;</code>, <em>et cetera</em>). The
<code>SuppressHTMLPreamble</code> option disables this behaviour,
causing the module to start the display with the header file
contents. The header file must contain appropriate HTML instructions
in this case. If there is no header file, the preamble is generated
as usual. If you also specify a <directive
module="mod_autoindex">ReadmeName</directive>, and if that file
exists, The closing &lt;/body&gt;&lt;/html&gt; tags are also
ommitted from the output, under the assumption that you'll likely
put those closing tags in that file.</dd>
<dt><a name="indexoptions.suppressicon"
id="indexoptions.suppressicon">SuppressIcon</a> (<em>Apache HTTP Server
2.0.23 and later</em>)</dt>
<dd>This will suppress the icon in fancy indexing listings.
Combining both <code>SuppressIcon</code> and
<code>SuppressRules</code> yields proper HTML 3.2 output, which
by the final specification prohibits <code>img</code> and
<code>hr</code> elements from the <code>pre</code> block (used to
format FancyIndexed listings.)</dd>
<dt><a name="indexoptions.suppresslastmodified"
id="indexoptions.suppresslastmodified"
>SuppressLastModified</a></dt>
<dd>This will suppress the display of the last modification date,
in fancy indexing listings.</dd>
<dt><a name="indexoptions.suppressrules"
id="indexoptions.suppressrules">SuppressRules</a>
(<em>Apache HTTP Server 2.0.23 and later</em>)</dt>
<dd>This will suppress the horizontal rule lines (<code>hr</code>
elements) in directory listings. Combining both <code>SuppressIcon</code> and
<code>SuppressRules</code> yields proper HTML 3.2 output, which
by the final specification prohibits <code>img</code> and
<code>hr</code> elements from the <code>pre</code> block (used to
format FancyIndexed listings.)</dd>
<dt><a name="indexoptions.suppresssize"
id="indexoptions.suppresssize">SuppressSize</a></dt>
<dd>This will suppress the file size in fancy indexing listings.</dd>
<dt><a name="indexoptions.trackmodified"
id="indexoptions.trackmodified">TrackModified</a> (<em>Apache HTTP Server
2.0.23 and later</em>)</dt>
<dd>This returns the <code>Last-Modified</code> and <code>ETag</code>
values for the listed directory in the HTTP header. It is only valid
if the operating system and file system return appropriate stat()
results. Some Unix systems do so, as do OS2's JFS and Win32's
NTFS volumes. OS2 and Win32 FAT volumes, for example, do not.
Once this feature is enabled, the client or proxy can track
changes to the list of files when they perform a <code>HEAD</code>
request. Note some operating systems correctly track new and
removed files, but do not track changes for sizes or dates of
the files within the directory. <strong>Changes to the size
or date stamp of an existing file will not update the
<code>Last-Modified</code> header on all Unix platforms.</strong>
If this is a concern, leave this option disabled.</dd>
<dt><a name="indexoptions.type"
id="indexoptions.type"
>Type=<var>MIME content-type</var></a> (<em>Apache HTTP Server 2.0.61 and
later</em>)</dt>
<dd>The <code>Type</code> keyword allows you to
specify the MIME content-type of the generated page. The default
is <var>text/html</var>.
<example><title>Example:</title>
IndexOptions Type=text/plain
</example>
</dd>
<dt><a name="indexoptions.versionsort"
id="indexoptions.versionsort">VersionSort</a>
(<em>Apache HTTP Server 2.0a3 and later</em>)</dt>
<dd>The <code>VersionSort</code> keyword causes files containing
version numbers to sort in a natural way. Strings are sorted as
usual, except that substrings of digits in the name and
description are compared according to their numeric value.
<example><title>Example:</title>
foo-1.7<br />
foo-1.7.2<br />
foo-1.7.12<br />
foo-1.8.2<br />
foo-1.8.2a<br />
foo-1.12
</example>
<p>If the number starts with a zero, then it is considered to
be a fraction:</p>
<example>
foo-1.001<br />
foo-1.002<br />
foo-1.030<br />
foo-1.04
</example>
</dd>
<dt><a name="indexoptions.xhtml"
id="indexoptions.xhtml">XHTML</a>
(<em>Apache HTTP Server 2.0.49 and later</em>)</dt>
<dd>The <code>XHTML</code> keyword forces <module>mod_autoindex</module>
to emit XHTML 1.0 code instead of HTML 3.2.</dd>
</dl>
<!--
XXX: we should consider to allow sections inside <usage>
this would require some xslt changes...
-->
<dl><dt>Incremental IndexOptions</dt>
<dd>
<p>Be aware of how multiple <directive>IndexOptions</directive> are
handled.</p>
<ul>
<li>Multiple <directive>IndexOptions</directive> directives for a
single directory are now merged together. The result of:
<example>
&lt;Directory /foo&gt;
<indent>
IndexOptions HTMLTable<br />
IndexOptions SuppressColumnsorting
</indent>
&lt;/Directory&gt;
</example>
<p>will be the equivalent of</p>
<example>
IndexOptions HTMLTable SuppressColumnsorting
</example>
</li>
<li>The addition of the incremental syntax (<em>i.e.</em>, prefixing
keywords with <code>+</code> or <code>-</code>).</li>
</ul>
<p>Whenever a '+' or '-' prefixed keyword is encountered, it
is applied to the current <directive>IndexOptions</directive>
settings (which may have been inherited from an upper-level
directory). However, whenever an unprefixed keyword is processed, it
clears all inherited options and any incremental settings encountered
so far. Consider the following example:</p>
<example>
IndexOptions +ScanHTMLTitles -IconsAreLinks FancyIndexing<br />
IndexOptions +SuppressSize
</example>
<p>The net effect is equivalent to <code>IndexOptions FancyIndexing
+SuppressSize</code>, because the unprefixed <code>FancyIndexing</code>
discarded the incremental keywords before it, but allowed them to
start accumulating again afterward.</p>
<p>To unconditionally set the <directive>IndexOptions</directive> for
a particular directory, clearing the inherited settings, specify
keywords without any <code>+</code> or <code>-</code> prefixes.</p>
</dd>
</dl>
</usage>
</directivesynopsis>
<directivesynopsis>
<name>IndexOrderDefault</name>
<description>Sets the default ordering of the directory index</description>
<syntax>IndexOrderDefault Ascending|Descending
Name|Date|Size|Description</syntax>
<default>IndexOrderDefault Ascending Name</default>
<contextlist><context>server config</context><context>virtual host</context>
<context>directory</context><context>.htaccess</context>
</contextlist>
<override>Indexes</override>
<usage>
<p>The <directive>IndexOrderDefault</directive> directive is used
in combination with the <code><a href="#indexoptions.fancyindexing"
>FancyIndexing</a></code> index option. By default, fancyindexed
directory listings are displayed in ascending order by filename; the
<directive>IndexOrderDefault</directive> allows you to change this
initial display order.</p>
<p><directive>IndexOrderDefault</directive> takes two
arguments. The first must be either <code>Ascending</code> or
<code>Descending</code>, indicating the direction of the sort.
The second argument must be one of the keywords <code>Name</code>,
<code>Date</code>, <code>Size</code>, or <code>Description</code>,
and identifies the primary key. The secondary key is
<em>always</em> the ascending filename.</p>
<p>You can, if desired, prevent the client from reordering the list
by also adding the <code><a
href="#indexoptions.suppresscolumnsorting">SuppressColumnSorting</a></code>
index option to remove the sort link from the top of the column,
along with the <code><a
href="#indexoptions.ignoreclient">IgnoreClient</a></code> index
option to prevent them from manually adding sort options to the
query string in order to override your ordering preferences.</p>
</usage>
</directivesynopsis>
<directivesynopsis>
<name>IndexStyleSheet</name>
<description>Adds a CSS stylesheet to the directory index</description>
<syntax>IndexStyleSheet <var>url-path</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>IndexStyleSheet</directive> directive sets the name of
the file that will be used as the CSS for the index listing.
</p>
<example>
<title>Example</title>
IndexStyleSheet "/css/style.css"
</example>
<p>Using this directive in conjunction with <code>IndexOptions
HTMLTable</code> adds a number of CSS classes to the resulting HTML.
The entire table is given a CSS id of <code>indexlist</code> and the
following classes are associated with the various parts of the
listing:</p>
<table>
<tr><th>Class</th><th>Definition</th></tr>
<tr><td>tr.indexhead</td><td>Header row of listing</td></tr>
<tr><td>th.indexcolicon and td.indexcolicon</td> <td>Icon column</td></tr>
<tr><td>th.indexcolname and td.indexcolname</td> <td>File name column</td></tr>
<tr><td>th.indexcollastmod and td.indexcollastmod</td> <td>Last modified column</td></tr>
<tr><td>th.indexcolsize and td.indexcolsize</td> <td>File size column</td></tr>
<tr><td>th.indexcoldesc and td.indexcoldesc</td> <td>Description column</td></tr>
<tr><td>tr.breakrow</td> <td>Horizontal rule at the bottom of the table</td></tr>
<tr><td>tr.odd and tr.even</td> <td>Alternating even and odd rows</td></tr>
</table>
</usage>
</directivesynopsis>
<directivesynopsis>
<name>IndexHeadInsert</name>
<description>Inserts text in the HEAD section of an index page.</description>
<syntax>IndexHeadInsert <var>"markup ..."</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>IndexHeadInsert</directive> directive specifies a
string to insert in the <var>&lt;head&gt;</var> section of the HTML
generated for the index page.</p>
<example>
<title>Example</title>
IndexHeadInsert "&lt;link rel=\"sitemap\" href=\"/sitemap.html\"&gt;"
</example>
</usage>
</directivesynopsis>
<directivesynopsis>
<name>ReadmeName</name>
<description>Name of the file that will be inserted at the end
of the index listing</description>
<syntax>ReadmeName <var>filename</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>ReadmeName</directive> directive sets the name
of the file that will be appended to the end of the index
listing. <var>Filename</var> is the name of the file to include, and
is taken to be relative to the location being indexed. If
<var>Filename</var> begins with a slash, it will be taken to be
relative to the <directive module="core">DocumentRoot</directive>.
</p>
<example><title>Example</title>
ReadmeName FOOTER.html
</example>
<example><title>Example 2</title>
ReadmeName /include/FOOTER.html
</example>
<p>See also <directive module="mod_autoindex"
>HeaderName</directive>, where this behavior is described in greater
detail.</p>
</usage>
</directivesynopsis>
</modulesynopsis>