]> granicus.if.org Git - apache/blob - docs/manual/mod/mod_autoindex.html.en
It seems we haven't built in some time
[apache] / docs / manual / mod / mod_autoindex.html.en
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
4         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
5               This file is generated from xml source: DO NOT EDIT
6         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
7       -->
8 <title>mod_autoindex - Apache HTTP Server</title>
9 <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
10 <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
11 <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
12 <link href="../images/favicon.ico" rel="shortcut icon" /></head>
13 <body>
14 <div id="page-header">
15 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
16 <p class="apache">Apache HTTP Server Version 2.3</p>
17 <img alt="" src="../images/feather.gif" /></div>
18 <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
19 <div id="path">
20 <a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.3</a> &gt; <a href="./">Modules</a></div>
21 <div id="page-content">
22 <div id="preamble"><h1>Apache Module mod_autoindex</h1>
23 <div class="toplang">
24 <p><span>Available Languages: </span><a href="../en/mod/mod_autoindex.html" title="English">&nbsp;en&nbsp;</a> |
25 <a href="../fr/mod/mod_autoindex.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
26 <a href="../ja/mod/mod_autoindex.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
27 <a href="../ko/mod/mod_autoindex.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
28 <a href="../tr/mod/mod_autoindex.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
29 </div>
30 <table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Generates directory indexes,
31     automatically, similar to the Unix <code>ls</code> command or the
32     Win32 <code>dir</code> shell command</td></tr>
33 <tr><th><a href="module-dict.html#Status">Status:</a></th><td>Base</td></tr>
34 <tr><th><a href="module-dict.html#ModuleIdentifier">Module Identifier:</a></th><td>autoindex_module</td></tr>
35 <tr><th><a href="module-dict.html#SourceFile">Source File:</a></th><td>mod_autoindex.c</td></tr></table>
36 <h3>Summary</h3>
37
38       <p>The index of a directory can come from one of two
39       sources:</p>
40
41     <ul>
42       <li>A file written by the user, typically called
43       <code>index.html</code>. The <code class="directive"><a href="../mod/mod_dir.html#directoryindex">DirectoryIndex</a></code> directive sets the
44       name of this file. This is controlled by
45       <code class="module"><a href="../mod/mod_dir.html">mod_dir</a></code>.</li>
46
47       <li>Otherwise, a listing generated by the server. The other
48       directives control the format of this listing. The <code class="directive"><a href="#addicon">AddIcon</a></code>, <code class="directive"><a href="#addiconbyencoding">AddIconByEncoding</a></code> and
49       <code class="directive"><a href="#addiconbytype">AddIconByType</a></code> are
50       used to set a list of icons to display for various file types;
51       for each file listed, the first icon listed that matches the
52       file is displayed. These are controlled by
53       <code class="module"><a href="../mod/mod_autoindex.html">mod_autoindex</a></code>.</li>
54     </ul>
55     <p>The two functions are separated so that you can completely
56     remove (or replace) automatic index generation should you want
57     to.</p>
58
59     <p>Automatic index generation is enabled with using
60     <code>Options +Indexes</code>. See the
61     <code class="directive"><a href="../mod/core.html#options">Options</a></code> directive for
62     more details.</p>
63
64     <p>If the <code><a href="#indexoptions.fancyindexing">FancyIndexing</a></code> option is given with the <code class="directive"><a href="#indexoptions">IndexOptions</a></code> directive,
65     the column headers are links that control the order of the
66     display. If you select a header link, the listing will be
67     regenerated, sorted by the values in that column. Selecting the
68     same header repeatedly toggles between ascending and descending
69     order. These column header links are suppressed with the
70     <code class="directive"><a href="#indexoptions">IndexOptions</a></code> directive's
71     <code>SuppressColumnSorting</code> option.</p>
72
73     <p>Note that when the display is sorted by "Size", it's the
74     <em>actual</em> size of the files that's used, not the
75     displayed value - so a 1010-byte file will always be displayed
76     before a 1011-byte file (if in ascending order) even though
77     they both are shown as "1K".</p>
78 </div>
79 <div id="quickview"><h3 class="directives">Directives</h3>
80 <ul id="toc">
81 <li><img alt="" src="../images/down.gif" /> <a href="#addalt">AddAlt</a></li>
82 <li><img alt="" src="../images/down.gif" /> <a href="#addaltbyencoding">AddAltByEncoding</a></li>
83 <li><img alt="" src="../images/down.gif" /> <a href="#addaltbytype">AddAltByType</a></li>
84 <li><img alt="" src="../images/down.gif" /> <a href="#adddescription">AddDescription</a></li>
85 <li><img alt="" src="../images/down.gif" /> <a href="#addicon">AddIcon</a></li>
86 <li><img alt="" src="../images/down.gif" /> <a href="#addiconbyencoding">AddIconByEncoding</a></li>
87 <li><img alt="" src="../images/down.gif" /> <a href="#addiconbytype">AddIconByType</a></li>
88 <li><img alt="" src="../images/down.gif" /> <a href="#defaulticon">DefaultIcon</a></li>
89 <li><img alt="" src="../images/down.gif" /> <a href="#headername">HeaderName</a></li>
90 <li><img alt="" src="../images/down.gif" /> <a href="#indexheadinsert">IndexHeadInsert</a></li>
91 <li><img alt="" src="../images/down.gif" /> <a href="#indexignore">IndexIgnore</a></li>
92 <li><img alt="" src="../images/down.gif" /> <a href="#indexoptions">IndexOptions</a></li>
93 <li><img alt="" src="../images/down.gif" /> <a href="#indexorderdefault">IndexOrderDefault</a></li>
94 <li><img alt="" src="../images/down.gif" /> <a href="#indexstylesheet">IndexStyleSheet</a></li>
95 <li><img alt="" src="../images/down.gif" /> <a href="#readmename">ReadmeName</a></li>
96 </ul>
97 <h3>Topics</h3>
98 <ul id="topics">
99 <li><img alt="" src="../images/down.gif" /> <a href="#query">Autoindex Request Query Arguments</a></li>
100 </ul></div>
101 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
102 <div class="section">
103 <h2><a name="query" id="query">Autoindex Request Query Arguments</a></h2>
104     
105
106     <p>Apache HTTP Server 2.0.23 reorganized the Query Arguments for Column
107     Sorting, and introduced an entire group of new query options.
108     To effectively eliminate all client control over the output,
109     the <code><a href="#indexoptions.ignoreclient">IndexOptions
110     IgnoreClient</a></code> option was introduced.</p>
111
112     <p>The column sorting headers themselves are self-referencing
113     hyperlinks that add the sort query options shown below. Any
114     option below may be added to any request for the directory
115     resource.</p>
116
117     <ul>
118       <li><code>C=N</code> sorts the directory by file name</li>
119
120       <li><code>C=M</code> sorts the directory by last-modified
121       date, then file name</li>
122
123       <li><code>C=S</code> sorts the directory by size, then file
124       name</li>
125
126       <li class="separate"><code>C=D</code> sorts the directory by description, then
127       file name</li>
128
129       <li><code>O=A</code> sorts the listing in Ascending
130       Order</li>
131
132       <li class="separate"><code>O=D</code> sorts the listing in Descending
133       Order</li>
134
135       <li><code>F=0</code> formats the listing as a simple list
136       (not FancyIndexed)</li>
137
138       <li><code>F=1</code> formats the listing as a FancyIndexed
139       list</li>
140
141       <li class="separate"><code>F=2</code> formats the listing as an
142       HTMLTable FancyIndexed list</li>
143
144       <li><code>V=0</code> disables version sorting</li>
145
146       <li class="separate"><code>V=1</code> enables version sorting</li>
147
148       <li><code>P=<var>pattern</var></code> lists only files matching
149       the given <var>pattern</var></li>
150     </ul>
151
152     <p>Note that the 'P'attern query argument is tested
153     <em>after</em> the usual <code class="directive"><a href="#indexignore">IndexIgnore</a></code> directives are processed,
154     and all file names are still subjected to the same criteria as
155     any other autoindex listing. The Query Arguments parser in
156     <code class="module"><a href="../mod/mod_autoindex.html">mod_autoindex</a></code> will stop abruptly when an unrecognized
157     option is encountered. The Query Arguments must be well formed,
158     according to the table above.</p>
159
160     <p>The simple example below, which can be clipped and saved in
161     a header.html file, illustrates these query options. Note that
162     the unknown "X" argument, for the submit button, is listed last
163     to assure the arguments are all parsed before mod_autoindex
164     encounters the X=Go input.</p>
165
166     <div class="example"><p><code>
167       &lt;form action="" method="get"&gt;<br />
168       <span class="indent">
169         Show me a &lt;select name="F"&gt;<br />
170         <span class="indent">
171           &lt;option value="0"&gt; Plain list&lt;/option&gt;<br />
172           &lt;option value="1" selected="selected"&gt; Fancy list&lt;/option&gt;<br />
173           &lt;option value="2"&gt; Table list&lt;/option&gt;<br />
174         </span>
175         &lt;/select&gt;<br />
176         Sorted by &lt;select name="C"&gt;<br />
177         <span class="indent">
178           &lt;option value="N" selected="selected"&gt; Name&lt;/option&gt;<br />
179           &lt;option value="M"&gt; Date Modified&lt;/option&gt;<br />
180           &lt;option value="S"&gt; Size&lt;/option&gt;<br />
181           &lt;option value="D"&gt; Description&lt;/option&gt;<br />
182         </span>
183         &lt;/select&gt;<br />
184         &lt;select name="O"&gt;<br />
185         <span class="indent">
186           &lt;option value="A" selected="selected"&gt; Ascending&lt;/option&gt;<br />
187           &lt;option value="D"&gt; Descending&lt;/option&gt;<br />
188         </span>
189         &lt;/select&gt;<br />
190         &lt;select name="V"&gt;<br />
191         <span class="indent">
192           &lt;option value="0" selected="selected"&gt; in Normal order&lt;/option&gt;<br />
193           &lt;option value="1"&gt; in Version order&lt;/option&gt;<br />
194         </span>
195         &lt;/select&gt;<br />
196         Matching &lt;input type="text" name="P" value="*" /&gt;<br />
197         &lt;input type="submit" name="X" value="Go" /&gt;<br />
198       </span>
199       &lt;/form&gt;
200     </code></p></div>
201
202 </div>
203 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
204 <div class="directive-section"><h2><a name="AddAlt" id="AddAlt">AddAlt</a> <a name="addalt" id="addalt">Directive</a></h2>
205 <table class="directive">
206 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Alternate text to display for a file, instead of an
207 icon selected by filename</td></tr>
208 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AddAlt <var>string</var> <var>file</var> [<var>file</var>] ...</code></td></tr>
209 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
210 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
211 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
212 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
213 </table>
214     <p><code class="directive">AddAlt</code> provides the alternate text to
215     display for a file, instead of an icon, for <code><a href="#indexoptions.fancyindexing">FancyIndexing</a></code>.
216     <var>File</var> is a file extension, partial filename, wild-card
217     expression or full filename for files to describe.
218     If <var>String</var> contains any whitespace, you have to enclose it
219     in quotes (<code>"</code> or <code>'</code>). This alternate text
220     is displayed if the client is image-incapable, has image loading
221     disabled, or fails to retrieve the icon.</p>
222
223     <div class="example"><h3>Examples</h3><p><code>
224       AddAlt "PDF file" *.pdf<br />
225       AddAlt Compressed *.gz *.zip *.Z
226     </code></p></div>
227
228 </div>
229 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
230 <div class="directive-section"><h2><a name="AddAltByEncoding" id="AddAltByEncoding">AddAltByEncoding</a> <a name="addaltbyencoding" id="addaltbyencoding">Directive</a></h2>
231 <table class="directive">
232 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Alternate text to display for a file instead of an icon
233 selected by MIME-encoding</td></tr>
234 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AddAltByEncoding <var>string</var> <var>MIME-encoding</var>
235 [<var>MIME-encoding</var>] ...</code></td></tr>
236 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
237 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
238 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
239 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
240 </table>
241     <p><code class="directive">AddAltByEncoding</code> provides the alternate
242     text to display for a file, instead of an icon, for <code><a href="#indexoptions.fancyindexing">FancyIndexing</a></code>.
243     <var>MIME-encoding</var> is a valid content-encoding, such as
244     <code>x-compress</code>. If <var>String</var> contains any whitespace,
245     you have to enclose it in quotes (<code>"</code> or <code>'</code>).
246     This alternate text is displayed if the client is image-incapable,
247     has image loading disabled, or fails to retrieve the icon.</p>
248
249     <div class="example"><h3>Example</h3><p><code>
250       AddAltByEncoding gzip x-gzip
251     </code></p></div>
252
253 </div>
254 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
255 <div class="directive-section"><h2><a name="AddAltByType" id="AddAltByType">AddAltByType</a> <a name="addaltbytype" id="addaltbytype">Directive</a></h2>
256 <table class="directive">
257 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Alternate text to display for a file, instead of an
258 icon selected by MIME content-type</td></tr>
259 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AddAltByType <var>string</var> <var>MIME-type</var>
260 [<var>MIME-type</var>] ...</code></td></tr>
261 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
262 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
263 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
264 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
265 </table>
266     <p><code class="directive">AddAltByType</code> sets the alternate text to
267     display for a file, instead of an icon, for <code><a href="#indexoptions.fancyindexing">FancyIndexing</a></code>.
268     <var>MIME-type</var> is a valid content-type, such as
269     <code>text/html</code>. If <var>String</var> contains any whitespace,
270     you have to enclose it in quotes (<code>"</code> or <code>'</code>).
271     This alternate text is displayed if the client is image-incapable,
272     has image loading disabled, or fails to retrieve the icon.</p>
273
274     <div class="example"><h3>Example</h3><p><code>
275       AddAltByType 'plain text' text/plain
276     </code></p></div>
277
278 </div>
279 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
280 <div class="directive-section"><h2><a name="AddDescription" id="AddDescription">AddDescription</a> <a name="adddescription" id="adddescription">Directive</a></h2>
281 <table class="directive">
282 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Description to display for a file</td></tr>
283 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AddDescription <var>string file</var> [<var>file</var>] ...</code></td></tr>
284 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
285 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
286 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
287 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
288 </table>
289     <p>This sets the description to display for a file, for
290     <code><a href="#indexoptions.fancyindexing">FancyIndexing</a></code>.
291     <var>File</var> is a file extension, partial filename, wild-card
292     expression or full filename for files to describe.
293     <var>String</var> is enclosed in double quotes (<code>"</code>).</p>
294
295     <div class="example"><h3>Example</h3><p><code>
296       AddDescription "The planet Mars" /web/pics/mars.gif
297     </code></p></div>
298
299     <p>The typical, default description field is 23 bytes wide. 6
300     more bytes are added by the <code><a href="#indexoptions.suppressicon">IndexOptions SuppressIcon</a></code> option, 7 bytes are
301     added by the <code><a href="#indexoptions.suppresssize">IndexOptions SuppressSize</a></code> option, and 19 bytes are
302     added by the <code><a href="#indexoptions.suppresslastmodified">IndexOptions SuppressLastModified</a></code> option.
303     Therefore, the widest default the description column is ever
304     assigned is 55 bytes.</p>
305
306     <p>Since the <var>File</var> argument may be a partial file name,
307     please remember that a too-short partial filename may match
308     unintended files. For example, <code>le.html</code> will match the
309     file <code>le.html</code> but will also match the file
310     <code>example.html</code>. In the event that there may be ambiguity,
311     use as complete a filename as you can, but keep in mind that the
312     first match encountered will be used, and order your list of
313     <code>AddDescription</code> directives accordingly.</p>
314
315     <p>See the <a href="#indexoptions.descriptionwidth">DescriptionWidth</a> <code class="directive"><a href="#indexoptions">IndexOptions</a></code> keyword for details on overriding the size
316     of this column, or allowing descriptions of unlimited length.</p>
317
318     <div class="note"><h3>Caution</h3>
319       <p>Descriptive text defined with <code class="directive">AddDescription</code>
320       may contain HTML markup, such as tags and character entities. If the
321       width of the description column should happen to truncate a tagged
322       element (such as cutting off the end of a bolded phrase), the
323       results may affect the rest of the directory listing.</p>
324     </div>
325
326 </div>
327 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
328 <div class="directive-section"><h2><a name="AddIcon" id="AddIcon">AddIcon</a> <a name="addicon" id="addicon">Directive</a></h2>
329 <table class="directive">
330 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Icon to display for a file selected by name</td></tr>
331 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AddIcon <var>icon</var> <var>name</var> [<var>name</var>]
332 ...</code></td></tr>
333 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
334 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
335 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
336 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
337 </table>
338     <p>This sets the icon to display next to a file ending in
339     <var>name</var> for <code><a href="#indexoptions.fancyindexing">FancyIndexing</a></code>. <var>Icon</var> is either a (%-escaped)
340     relative URL to the icon, or of the format <code>
341     (<var>alttext</var>,<var>url</var>)</code> where <var>alttext</var>
342     is the text tag given for an icon for non-graphical browsers.</p>
343
344     <p><var>Name</var> is either <code>^^DIRECTORY^^</code> for directories,
345     <code>^^BLANKICON^^</code> for blank lines (to format the list
346     correctly), a file extension, a wildcard expression, a partial
347     filename or a complete filename.</p>
348
349     <div class="example"><h3>Examples</h3><p><code>
350       AddIcon (IMG,/icons/image.png) .gif .jpg .png<br />
351       AddIcon /icons/dir.png ^^DIRECTORY^^<br />
352       AddIcon /icons/backup.png *~
353     </code></p></div>
354
355     <p><code class="directive"><a href="#addiconbytype">AddIconByType</a></code>
356     should be used in preference to <code class="directive">AddIcon</code>,
357     when possible.</p>
358
359 </div>
360 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
361 <div class="directive-section"><h2><a name="AddIconByEncoding" id="AddIconByEncoding">AddIconByEncoding</a> <a name="addiconbyencoding" id="addiconbyencoding">Directive</a></h2>
362 <table class="directive">
363 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Icon to display next to files selected by MIME
364 content-encoding</td></tr>
365 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AddIconByEncoding <var>icon</var> <var>MIME-encoding</var>
366 [<var>MIME-encoding</var>] ...</code></td></tr>
367 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
368 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
369 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
370 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
371 </table>
372     <p>This sets the icon to display next to files with <code><a href="#indexoptions.fancyindexing">FancyIndexing</a></code>.
373     <var>Icon</var> is either a (%-escaped) relative URL to the icon,
374     or of the format <code>(<var>alttext</var>,<var>url</var>)</code>
375     where <var>alttext</var> is the text tag given for an icon for
376     non-graphical browsers.</p>
377
378     <p><var>MIME-encoding</var> is a valid content-encoding, such as
379     <code>x-compress</code>.</p>
380
381     <div class="example"><h3>Example</h3><p><code>
382       AddIconByEncoding /icons/compress.png x-compress
383     </code></p></div>
384
385 </div>
386 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
387 <div class="directive-section"><h2><a name="AddIconByType" id="AddIconByType">AddIconByType</a> <a name="addiconbytype" id="addiconbytype">Directive</a></h2>
388 <table class="directive">
389 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Icon to display next to files selected by MIME
390 content-type</td></tr>
391 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AddIconByType <var>icon</var> <var>MIME-type</var>
392 [<var>MIME-type</var>] ...</code></td></tr>
393 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
394 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
395 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
396 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
397 </table>
398     <p>This sets the icon to display next to files of type
399     <var>MIME-type</var> for <code><a href="#indexoptions.fancyindexing">FancyIndexing</a></code>.
400     <var>Icon</var> is either a (%-escaped) relative URL to the icon,
401     or of the format <code>(<var>alttext</var>,<var>url</var>)</code>
402     where <var>alttext</var> is the text tag given for an icon for
403     non-graphical browsers.</p>
404
405     <p><var>MIME-type</var> is a wildcard expression matching
406     required the mime types.</p>
407
408     <div class="example"><h3>Example</h3><p><code>
409       AddIconByType (IMG,/icons/image.png) image/*
410     </code></p></div>
411
412 </div>
413 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
414 <div class="directive-section"><h2><a name="DefaultIcon" id="DefaultIcon">DefaultIcon</a> <a name="defaulticon" id="defaulticon">Directive</a></h2>
415 <table class="directive">
416 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Icon to display for files when no specific icon is
417 configured</td></tr>
418 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DefaultIcon <var>url-path</var></code></td></tr>
419 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
420 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
421 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
422 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
423 </table>
424     <p>The <code class="directive">DefaultIcon</code> directive sets the icon
425     to display for files when no specific icon is known, for <code><a href="#indexoptions.fancyindexing">FancyIndexing</a></code>.
426     <var>Url-path</var> is a (%-escaped) relative URL to the icon.</p>
427
428     <div class="example"><h3>Example</h3><p><code>
429       DefaultIcon /icon/unknown.png
430     </code></p></div>
431
432 </div>
433 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
434 <div class="directive-section"><h2><a name="HeaderName" id="HeaderName">HeaderName</a> <a name="headername" id="headername">Directive</a></h2>
435 <table class="directive">
436 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Name of the file that will be inserted at the top
437 of the index listing</td></tr>
438 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>HeaderName <var>filename</var></code></td></tr>
439 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
440 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
441 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
442 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
443 </table>
444     <p>The <code class="directive">HeaderName</code> directive sets the name
445     of the file that will be inserted at the top of the index
446     listing. <var>Filename</var> is the name of the file to include.</p>
447
448     <div class="example"><h3>Example</h3><p><code>
449       HeaderName HEADER.html
450     </code></p></div>
451
452     <div class="note">
453       <p>Both HeaderName and <code class="directive"><a href="#readmename">ReadmeName</a></code> now treat
454       <var>Filename</var> as a URI path relative to the one used to
455       access the directory being indexed. If <var>Filename</var> begins
456       with a slash, it will be taken to be relative to the <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code>.</p>
457
458       <div class="example"><h3>Example</h3><p><code>
459         HeaderName /include/HEADER.html
460       </code></p></div>
461
462       <p><var>Filename</var> must resolve to a document with a major
463       content type of <code>text/*</code> (<em>e.g.</em>,
464       <code>text/html</code>, <code>text/plain</code>, etc.). This means
465       that <var>filename</var> may refer to a CGI script if the script's
466       actual file type (as opposed to its output) is marked as
467       <code>text/html</code> such as with a directive like:</p>
468
469       <div class="example"><p><code>
470         AddType text/html .cgi
471       </code></p></div>
472
473       <p><a href="../content-negotiation.html">Content negotiation</a>
474       will be performed if <code class="directive"><a href="../mod/core.html#options">Options</a></code>
475       <code>MultiViews</code> is in effect. If <var>filename</var> resolves
476       to a static <code>text/html</code> document (not a CGI script) and
477       either one of the <code class="directive"><a href="../mod/core.html#options">options</a></code>
478       <code>Includes</code> or <code>IncludesNOEXEC</code> is enabled,
479       the file will be processed for server-side includes (see the
480       <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> documentation).</p>
481     </div>
482
483     <p>If the file specified by <code class="directive">HeaderName</code> contains
484     the beginnings of an HTML document (&lt;html&gt;, &lt;head&gt;, etc.)
485     then you will probably want to set <a href="#indexoptions.suppresshtmlpreamble"><code>IndexOptions
486     +SuppressHTMLPreamble</code></a>, so that these tags are not
487     repeated.</p>
488
489 </div>
490 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
491 <div class="directive-section"><h2><a name="IndexHeadInsert" id="IndexHeadInsert">IndexHeadInsert</a> <a name="indexheadinsert" id="indexheadinsert">Directive</a></h2>
492 <table class="directive">
493 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Inserts text in the HEAD section of an index page.</td></tr>
494 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>IndexHeadInsert <var>"markup ..."</var></code></td></tr>
495 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
496 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
497 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
498 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
499 </table>
500     <p>The <code class="directive">IndexHeadInsert</code> directive specifies a
501     string to insert in the <var>&lt;head&gt;</var> section of the HTML
502     generated for the index page.</p>
503     <div class="example"><h3>Example</h3><p><code>
504       
505       IndexHeadInsert "&lt;link rel=\"sitemap\" href=\"/sitemap.html\"&gt;"
506     </code></p></div>
507
508 </div>
509 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
510 <div class="directive-section"><h2><a name="IndexIgnore" id="IndexIgnore">IndexIgnore</a> <a name="indexignore" id="indexignore">Directive</a></h2>
511 <table class="directive">
512 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Adds to the list of files to hide when listing
513 a directory</td></tr>
514 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>IndexIgnore <var>file</var> [<var>file</var>] ...</code></td></tr>
515 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
516 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
517 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
518 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
519 </table>
520     <p>The <code class="directive">IndexIgnore</code> directive adds to the
521     list of files to hide when listing a directory. <var>File</var> is a
522     shell-style wildcard expression or full
523     filename. Multiple IndexIgnore directives add
524     to the list, rather than the replacing the list of ignored
525     files. By default, the list contains <code>.</code> (the current
526     directory).</p>
527
528     <div class="example"><p><code>
529       IndexIgnore README .htaccess *.bak *~
530     </code></p></div>
531
532 </div>
533 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
534 <div class="directive-section"><h2><a name="IndexOptions" id="IndexOptions">IndexOptions</a> <a name="indexoptions" id="indexoptions">Directive</a></h2>
535 <table class="directive">
536 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Various configuration settings for directory
537 indexing</td></tr>
538 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>IndexOptions  [+|-]<var>option</var> [[+|-]<var>option</var>]
539 ...</code></td></tr>
540 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
541 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
542 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
543 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
544 </table>
545     <p>The <code class="directive">IndexOptions</code> directive specifies the
546     behavior of the directory indexing. <var>Option</var> can be one
547     of</p>
548
549     <dl>
550       <dt><a name="indexoptions.addaltclass" id="indexoptions.addaltclass">AddAltClass</a></dt>
551       <dd>Adds an additional CSS class declaration to each row of the
552       directory listing table when <code>IndexOptions HTMLTable</code> 
553       is in effect and an <code>IndexStyleSheet</code> is defined.
554       Rather than the standard <code>even</code> and <code>odd</code>
555       classes that would otherwise be applied to each row of the table,
556       a class of <code>even-<em>ALT</em></code> or
557       <code>odd-<em>ALT</em></code> where <em>ALT</em> is either the
558       standard alt text associated with the file style (eg. <em>snd</em>,
559       <em>txt</em>, <em>img</em>, etc) or the alt text defined by one of
560       the various <code>AddAlt*</code> directives.
561       </dd>
562
563       <dt><a name="indexoptions.charset" id="indexoptions.charset">Charset=<var>character-set</var></a> (<em>Apache HTTP Server 2.0.61 and
564       later</em>)</dt>
565
566       <dd>The <code>Charset</code> keyword allows you to
567       specify the character set of the generated page. The
568       default is either <var>ISO-8859-1</var> or <var>UTF-8</var>,
569       depending on whether the underlying file system is unicode
570       or not.
571
572       <div class="example"><h3>Example:</h3><p><code>
573         IndexOptions Charset=UTF-8
574       </code></p></div>
575       </dd>
576
577       <dt><a name="indexoptions.descriptionwidth" id="indexoptions.descriptionwidth">DescriptionWidth=[<var>n</var> | *]</a> (<em>Apache HTTP Server 2.0.23 and
578       later</em>)</dt>
579
580       <dd>The <code>DescriptionWidth</code> keyword allows you to
581       specify the width of the description column in
582       characters.</dd>
583
584       <dd><code>-DescriptionWidth</code> (or unset) allows
585       <code class="module"><a href="../mod/mod_autoindex.html">mod_autoindex</a></code> to calculate the best width.</dd>
586
587       <dd><code>DescriptionWidth=<var>n</var></code> fixes the column width to
588       <var>n</var> bytes wide.</dd>
589
590       <dd><code>DescriptionWidth=*</code> grows the column to the
591       width necessary to accommodate the longest description
592       string.</dd>
593
594       <dd><strong>See the section on <code class="directive"><a href="#adddescription">AddDescription</a></code> for dangers
595       inherent in truncating descriptions.</strong></dd>
596
597       <dt><a name="indexoptions.fancyindexing" id="indexoptions.fancyindexing">FancyIndexing</a></dt>
598
599       <dd>This turns on fancy indexing of directories.</dd>
600
601       <dt><a name="indexoptions.foldersfirst" id="indexoptions.foldersfirst">FoldersFirst</a> (<em>Apache HTTP Server
602       2.0.23 and later</em>)</dt>
603
604       <dd>If this option is enabled, subdirectory listings will
605       <em>always</em> appear first, followed by normal files in the
606       directory. The listing is basically broken into two
607       components, the files and the subdirectories, and each is
608       sorted separately and then displayed subdirectories-first.
609       For instance, if the sort order is descending by name, and
610       <code>FoldersFirst</code> is enabled, subdirectory
611       <code>Zed</code> will be listed before subdirectory
612       <code>Beta</code>, which will be listed before normal files
613       <code>Gamma</code> and <code>Alpha</code>. <strong>This option
614       only has an effect if <a href="#indexoptions.fancyindexing"><code>FancyIndexing</code></a> is also enabled.</strong></dd>
615
616       <dt><a name="indexoptions.htmltable" id="indexoptions.htmltable">HTMLTable</a> (<em>Apache
617       HTTP Server 2.0.23 and later</em>)</dt>
618
619       <dd>This option with <code>FancyIndexing</code> constructs
620       a simple table for the fancy directory listing. 
621       It is necessary for utf-8 enabled platforms or if file
622       names or description text will alternate between
623       left-to-right and right-to-left reading order.</dd>
624
625       <dt><a name="indexoptions.iconsarelinks" id="indexoptions.iconsarelinks">IconsAreLinks</a></dt>
626
627       <dd>This makes the icons part of the anchor for the filename, for
628       fancy indexing.</dd>
629
630       <dt><a name="indexoptions.iconheight" id="indexoptions.iconheight">IconHeight[=<var>pixels</var>]</a></dt>
631
632       <dd>Presence of this option, when used with <code>IconWidth</code>,
633       will cause the server to include <code>height</code> and
634       <code>width</code> attributes in the <code>img</code> tag for the file
635       icon. This allows browser to precalculate the page layout without having
636       to wait until all the images have been loaded. If no value is given for
637       the option, it defaults to the standard height of the icons supplied
638       with the Apache httpd software.</dd>
639
640       <dt><a name="indexoptions.iconwidth" id="indexoptions.iconwidth">IconWidth[=<var>pixels</var>]</a></dt>
641
642       <dd>Presence of this option, when used with <code>IconHeight</code>,
643       will cause the server to include <code>height</code> and
644       <code>width</code> attributes in the <code>img</code> tag for
645       the file icon. This allows browser to precalculate the page
646       layout without having to wait until all the images have been
647       loaded. If no value is given for the option, it defaults to
648       the standard width of the icons supplied with the Apache httpd
649       software.</dd>
650
651       <dt><a name="indexoptions.ignorecase" id="indexoptions.ignorecase">IgnoreCase</a></dt>
652
653       <dd>If this option is enabled, names are sorted in a case-insensitive
654       manner.  For instance, if the sort order is ascending by name, and
655       <code>IgnoreCase</code> is enabled, file Zeta  will be listed after
656       file alfa (Note: file GAMMA will always be listed before file gamma).
657       </dd>
658
659       <dt><a name="indexoptions.ignoreclient" id="indexoptions.ignoreclient">IgnoreClient</a></dt>
660
661       <dd>This option causes <code class="module"><a href="../mod/mod_autoindex.html">mod_autoindex</a></code> to ignore all
662       query variables from the client, including sort order (implies
663       <code><a href="#indexoptions.suppresscolumnsorting">SuppressColumnSorting</a></code>.)</dd>
664
665       <dt><a name="indexoptions.namewidth" id="indexoptions.namewidth">NameWidth=[<var>n</var>
666                | *]</a></dt>
667
668       <dd>The <code>NameWidth</code> keyword allows you to specify the width
669       of the filename column in bytes.</dd>
670
671       <dd><code>-NameWidth</code> (or unset) allows <code class="module"><a href="../mod/mod_autoindex.html">mod_autoindex</a></code> to calculate the best width, but only up
672       to 20 bytes wide.</dd>
673
674       <dd><code>NameWidth=<var>n</var></code> fixes the column width to
675       <var>n</var> bytes wide.</dd>
676
677       <dd><code>NameWidth=*</code> grows the column to the necessary
678       width.</dd>
679
680       <dt><a name="indexoptions.scanhtmltitles" id="indexoptions.scanhtmltitles">ScanHTMLTitles</a></dt>
681
682       <dd>This enables the extraction of the title from HTML documents
683       for fancy indexing. If the file does not have a description
684       given by <code class="directive"><a href="#adddescription">AddDescription</a></code>
685       then httpd will read the document for the value of the
686       <code>title</code> element. This is CPU and disk intensive.</dd>
687
688       <dt><a name="indexoptions.showforbidden" id="indexoptions.showforbidden">ShowForbidden</a></dt>
689
690       <dd>If specified, Apache httpd will show files normally hidden because
691       the subrequest returned <code>HTTP_UNAUTHORIZED</code> or
692       <code>HTTP_FORBIDDEN</code></dd>
693
694       <dt><a name="indexoptions.suppresscolumnsorting" id="indexoptions.suppresscolumnsorting">SuppressColumnSorting</a></dt>
695
696       <dd>If specified, Apache httpd will not make the column headings in a
697       FancyIndexed directory listing into links for sorting. The
698       default behavior is for them to be links; selecting the
699       column heading will sort the directory listing by the values
700       in that column. <strong>Prior to Apache HTTP Server 2.0.23, this also
701       disabled parsing the Query Arguments for the sort
702       string.</strong> That behavior is now controlled by <a href="#indexoptions.ignoreclient"><code>IndexOptions
703       IgnoreClient</code></a> in Apache HTTP Server 2.0.23.</dd>
704
705       <dt><a name="indexoptions.suppressdescription" id="indexoptions.suppressdescription">SuppressDescription</a></dt>
706
707       <dd>This will suppress the file description in fancy indexing
708       listings. By default, no file descriptions are defined, and
709       so the use of this option will regain 23 characters of screen
710       space to use for something else. See <code class="directive"><a href="#adddescription">AddDescription</a></code> for information about setting the file
711       description. See also the <code><a href="#indexoptions.descriptionwidth">DescriptionWidth</a></code>
712       index option to limit the size of the description column.</dd>
713
714       <dt><a name="indexoptions.suppresshtmlpreamble" id="indexoptions.suppresshtmlpreamble">SuppressHTMLPreamble</a></dt>
715
716       <dd>If the directory actually contains a file specified by the
717       <code class="directive"><a href="#headername">HeaderName</a></code>
718       directive, the module usually includes the contents of the file
719       after a standard HTML preamble (<code>&lt;html&gt;</code>,
720       <code>&lt;head&gt;</code>, <em>et cetera</em>). The
721       <code>SuppressHTMLPreamble</code> option disables this behaviour,
722       causing the module to start the display with the header file
723       contents. The header file must contain appropriate HTML instructions
724       in this case. If there is no header file, the preamble is generated
725       as usual.</dd>
726
727       <dt><a name="indexoptions.suppressicon" id="indexoptions.suppressicon">SuppressIcon</a> (<em>Apache HTTP Server
728       2.0.23 and later</em>)</dt>
729
730       <dd>This will suppress the icon in fancy indexing listings.
731       Combining both <code>SuppressIcon</code> and
732       <code>SuppressRules</code> yields proper HTML 3.2 output, which
733       by the final specification prohibits <code>img</code> and
734       <code>hr</code> elements from the <code>pre</code> block (used to
735       format FancyIndexed listings.)</dd>
736
737       <dt><a name="indexoptions.suppresslastmodified" id="indexoptions.suppresslastmodified">SuppressLastModified</a></dt>
738
739       <dd>This will suppress the display of the last modification date,
740       in fancy indexing listings.</dd>
741
742       <dt><a name="indexoptions.suppressrules" id="indexoptions.suppressrules">SuppressRules</a>
743       (<em>Apache HTTP Server 2.0.23 and later</em>)</dt>
744
745       <dd>This will suppress the horizontal rule lines (<code>hr</code>
746       elements) in directory listings. Combining both <code>SuppressIcon</code> and
747       <code>SuppressRules</code> yields proper HTML 3.2 output, which
748       by the final specification prohibits <code>img</code> and
749       <code>hr</code> elements from the <code>pre</code> block (used to
750       format FancyIndexed listings.)</dd>
751
752       <dt><a name="indexoptions.suppresssize" id="indexoptions.suppresssize">SuppressSize</a></dt>
753
754       <dd>This will suppress the file size in fancy indexing listings.</dd>
755
756       <dt><a name="indexoptions.trackmodified" id="indexoptions.trackmodified">TrackModified</a> (<em>Apache HTTP Server
757       2.0.23 and later</em>)</dt>
758
759       <dd>This returns the <code>Last-Modified</code> and <code>ETag</code>
760       values for the listed directory in the HTTP header. It is only valid
761       if the operating system and file system return appropriate stat()
762       results. Some Unix systems do so, as do OS2's JFS and Win32's
763       NTFS volumes. OS2 and Win32 FAT volumes, for example, do not.
764       Once this feature is enabled, the client or proxy can track
765       changes to the list of files when they perform a <code>HEAD</code>
766       request. Note some operating systems correctly track new and
767       removed files, but do not track changes for sizes or dates of
768       the files within the directory. <strong>Changes to the size
769       or date stamp of an existing file will not update the
770       <code>Last-Modified</code> header on all Unix platforms.</strong>
771       If this is a concern, leave this option disabled.</dd>
772
773       <dt><a name="indexoptions.type" id="indexoptions.type">Type=<var>MIME content-type</var></a> (<em>Apache HTTP Server 2.0.61 and
774       later</em>)</dt>
775
776       <dd>The <code>Type</code> keyword allows you to
777       specify the MIME content-type of the generated page. The default
778       is <var>text/html</var>.
779
780       <div class="example"><h3>Example:</h3><p><code>
781         IndexOptions Type=text/plain
782       </code></p></div>
783       </dd>
784
785       <dt><a name="indexoptions.versionsort" id="indexoptions.versionsort">VersionSort</a>
786       (<em>Apache HTTP Server 2.0a3 and later</em>)</dt>
787
788       <dd>The <code>VersionSort</code> keyword causes files containing
789       version numbers to sort in a natural way. Strings are sorted as
790       usual, except that substrings of digits in the name and
791       description are compared according to their numeric value.
792
793       <div class="example"><h3>Example:</h3><p><code>
794         foo-1.7<br />
795         foo-1.7.2<br />
796         foo-1.7.12<br />
797         foo-1.8.2<br />
798         foo-1.8.2a<br />
799         foo-1.12
800       </code></p></div>
801
802       <p>If the number starts with a zero, then it is considered to
803       be a fraction:</p>
804
805       <div class="example"><p><code>
806         foo-1.001<br />
807         foo-1.002<br />
808         foo-1.030<br />
809         foo-1.04
810       </code></p></div>
811       </dd>
812
813       <dt><a name="indexoptions.xhtml" id="indexoptions.xhtml">XHTML</a>
814       (<em>Apache HTTP Server 2.0.49 and later</em>)</dt>
815
816       <dd>The <code>XHTML</code> keyword forces <code class="module"><a href="../mod/mod_autoindex.html">mod_autoindex</a></code>
817       to emit XHTML 1.0 code instead of HTML 3.2.</dd>
818
819     </dl>
820
821    
822    <dl><dt>Incremental IndexOptions</dt>
823    <dd>
824      <p>Be aware of how multiple <code class="directive">IndexOptions</code> are
825      handled.</p>
826
827      <ul>
828      <li>Multiple <code class="directive">IndexOptions</code> directives for a
829      single directory are now merged together. The result of:
830
831      <div class="example"><p><code>
832        &lt;Directory /foo&gt;
833        <span class="indent">
834          IndexOptions HTMLTable<br />
835          IndexOptions SuppressColumnsorting
836        </span>
837        &lt;/Directory&gt;
838      </code></p></div>
839
840      <p>will be the equivalent of</p>
841
842      <div class="example"><p><code>
843        IndexOptions HTMLTable SuppressColumnsorting
844      </code></p></div>
845      </li>
846
847      <li>The addition of the incremental syntax (<em>i.e.</em>, prefixing
848      keywords with <code>+</code> or <code>-</code>).</li>
849      </ul>
850
851      <p>Whenever a '+' or '-' prefixed keyword is encountered, it
852      is applied to the current <code class="directive">IndexOptions</code>
853      settings (which may have been inherited from an upper-level
854      directory). However, whenever an unprefixed keyword is processed, it
855      clears all inherited options and any incremental settings encountered
856      so far. Consider the following example:</p>
857
858      <div class="example"><p><code>
859        IndexOptions +ScanHTMLTitles -IconsAreLinks FancyIndexing<br />
860        IndexOptions +SuppressSize
861      </code></p></div>
862
863      <p>The net effect is equivalent to <code>IndexOptions FancyIndexing
864      +SuppressSize</code>, because the unprefixed <code>FancyIndexing</code>
865      discarded the incremental keywords before it, but allowed them to
866      start accumulating again afterward.</p>
867
868      <p>To unconditionally set the <code class="directive">IndexOptions</code> for
869      a particular directory, clearing the inherited settings, specify
870      keywords without any <code>+</code> or <code>-</code> prefixes.</p>
871    </dd>
872    </dl>
873
874 </div>
875 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
876 <div class="directive-section"><h2><a name="IndexOrderDefault" id="IndexOrderDefault">IndexOrderDefault</a> <a name="indexorderdefault" id="indexorderdefault">Directive</a></h2>
877 <table class="directive">
878 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Sets the default ordering of the directory index</td></tr>
879 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>IndexOrderDefault Ascending|Descending
880 Name|Date|Size|Description</code></td></tr>
881 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>IndexOrderDefault Ascending Name</code></td></tr>
882 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
883 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
884 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
885 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
886 </table>
887     <p>The <code class="directive">IndexOrderDefault</code> directive is used
888     in combination with the <code><a href="#indexoptions.fancyindexing">FancyIndexing</a></code> index option. By default, fancyindexed
889     directory listings are displayed in ascending order by filename; the
890     <code class="directive">IndexOrderDefault</code> allows you to change this
891     initial display order.</p>
892
893     <p><code class="directive">IndexOrderDefault</code> takes two
894     arguments. The first must be either <code>Ascending</code> or
895     <code>Descending</code>, indicating the direction of the sort.
896     The second argument must be one of the keywords <code>Name</code>,
897     <code>Date</code>, <code>Size</code>, or <code>Description</code>,
898     and identifies the primary key. The secondary key is
899     <em>always</em> the ascending filename.</p>
900
901     <p>You can force a directory listing to only be displayed in a
902     particular order by combining this directive with the <code><a href="#indexoptions.suppresscolumnsorting">SuppressColumnSorting</a></code> index option; this will prevent
903     the client from requesting the directory listing in a different
904     order.</p>
905
906 </div>
907 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
908 <div class="directive-section"><h2><a name="IndexStyleSheet" id="IndexStyleSheet">IndexStyleSheet</a> <a name="indexstylesheet" id="indexstylesheet">Directive</a></h2>
909 <table class="directive">
910 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Adds a CSS stylesheet to the directory index</td></tr>
911 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>IndexStyleSheet <var>url-path</var></code></td></tr>
912 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
913 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
914 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
915 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
916 </table>
917     <p>The <code class="directive">IndexStyleSheet</code> directive sets the name of
918     the file that will be used as the CSS for the index listing.
919     </p>
920     <div class="example"><h3>Example</h3><p><code>
921       
922       IndexStyleSheet "/css/style.css"
923     </code></p></div>
924
925     <p>Using this directive in conjunction with <code>IndexOptions
926     HTMLTable</code> adds a number of CSS classes to the resulting HTML.
927     The entire table is given a CSS id of <code>indexlist</code> and the
928     following classes are associated with the various parts of the
929     listing:</p>
930
931     <table>
932     <tr><th>Class</th><th>Definition</th></tr>
933     <tr><td>tr.indexhead</td><td>Header row of listing</td></tr>
934     <tr><td>th.indexcolicon and td.indexcolicon</td> <td>Icon column</td></tr>
935     <tr><td>th.indexcolname and td.indexcolname</td> <td>File name column</td></tr>
936     <tr><td>th.indexcollastmod and td.indexcollastmod</td> <td>Last modified column</td></tr>
937     <tr><td>th.indexcolsize and td.indexcolsize</td> <td>File size column</td></tr>
938     <tr><td>th.indexcoldesc and td.indexcoldesc</td> <td>Description column</td></tr>
939     <tr><td>tr.breakrow</td> <td>Horizontal rule at the bottom of the table</td></tr>
940     <tr><td>tr.odd and tr.even</td> <td>Alternating even and odd rows</td></tr>
941     </table>
942
943
944 </div>
945 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
946 <div class="directive-section"><h2><a name="ReadmeName" id="ReadmeName">ReadmeName</a> <a name="readmename" id="readmename">Directive</a></h2>
947 <table class="directive">
948 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Name of the file that will be inserted at the end
949 of the index listing</td></tr>
950 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ReadmeName <var>filename</var></code></td></tr>
951 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
952 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
953 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
954 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
955 </table>
956     <p>The <code class="directive">ReadmeName</code> directive sets the name
957     of the file that will be appended to the end of the index
958     listing. <var>Filename</var> is the name of the file to include, and
959     is taken to be relative to the location being indexed. If
960     <var>Filename</var> begins with a slash, it will be taken to be
961     relative to the <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code>.
962     </p>
963
964     <div class="example"><h3>Example</h3><p><code>
965       ReadmeName FOOTER.html
966     </code></p></div>
967
968     <div class="example"><h3>Example 2</h3><p><code>
969       ReadmeName /include/FOOTER.html
970     </code></p></div>
971
972     <p>See also <code class="directive"><a href="#headername">HeaderName</a></code>, where this behavior is described in greater
973     detail.</p>
974
975 </div>
976 </div>
977 <div class="bottomlang">
978 <p><span>Available Languages: </span><a href="../en/mod/mod_autoindex.html" title="English">&nbsp;en&nbsp;</a> |
979 <a href="../fr/mod/mod_autoindex.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
980 <a href="../ja/mod/mod_autoindex.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
981 <a href="../ko/mod/mod_autoindex.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
982 <a href="../tr/mod/mod_autoindex.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
983 </div><div id="footer">
984 <p class="apache">Copyright 2010 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
985 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div>
986 </body></html>