]> granicus.if.org Git - apache/blob - docs/manual/mod/mod_autoindex.html.en
33309533754bcbc274fed01aadb03831a92769e2
[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.xbm) .gif .jpg .xbm<br />
351       AddIcon /icons/dir.xbm ^^DIRECTORY^^<br />
352       AddIcon /icons/backup.xbm *~
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.xbm 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.xbm) 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.xbm
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>Experimental,
617       Apache HTTP Server 2.0.23 and later</em>)</dt>
618
619       <dd>This experimental option with <code>FancyIndexing</code> constructs
620       a simple table for the fancy directory listing. Note this will
621       confuse older browsers. It is particularly necessary if file
622       names or description text will alternate between
623       left-to-right and right-to-left reading order, as can happen
624       on WinNT or other utf-8 enabled platforms.</dd>
625
626       <dt><a name="indexoptions.iconsarelinks" id="indexoptions.iconsarelinks">IconsAreLinks</a></dt>
627
628       <dd>This makes the icons part of the anchor for the filename, for
629       fancy indexing.</dd>
630
631       <dt><a name="indexoptions.iconheight" id="indexoptions.iconheight">IconHeight[=<var>pixels</var>]</a></dt>
632
633       <dd>Presence of this option, when used with <code>IconWidth</code>,
634       will cause the server to include <code>height</code> and
635       <code>width</code> attributes in the <code>img</code> tag for the file
636       icon. This allows browser to precalculate the page layout without having
637       to wait until all the images have been loaded. If no value is given for
638       the option, it defaults to the standard height of the icons supplied
639       with the Apache httpd software.</dd>
640
641       <dt><a name="indexoptions.iconwidth" id="indexoptions.iconwidth">IconWidth[=<var>pixels</var>]</a></dt>
642
643       <dd>Presence of this option, when used with <code>IconHeight</code>,
644       will cause the server to include <code>height</code> and
645       <code>width</code> attributes in the <code>img</code> tag for
646       the file icon. This allows browser to precalculate the page
647       layout without having to wait until all the images have been
648       loaded. If no value is given for the option, it defaults to
649       the standard width of the icons supplied with the Apache httpd
650       software.</dd>
651
652       <dt><a name="indexoptions.ignorecase" id="indexoptions.ignorecase">IgnoreCase</a></dt>
653
654       <dd>If this option is enabled, names are sorted in a case-insensitive
655       manner.  For instance, if the sort order is ascending by name, and
656       <code>IgnoreCase</code> is enabled, file Zeta  will be listed after
657       file alfa (Note: file GAMMA will always be listed before file gamma).
658       </dd>
659
660       <dt><a name="indexoptions.ignoreclient" id="indexoptions.ignoreclient">IgnoreClient</a></dt>
661
662       <dd>This option causes <code class="module"><a href="../mod/mod_autoindex.html">mod_autoindex</a></code> to ignore all
663       query variables from the client, including sort order (implies
664       <code><a href="#indexoptions.suppresscolumnsorting">SuppressColumnSorting</a></code>.)</dd>
665
666       <dt><a name="indexoptions.namewidth" id="indexoptions.namewidth">NameWidth=[<var>n</var>
667                | *]</a></dt>
668
669       <dd>The <code>NameWidth</code> keyword allows you to specify the width
670       of the filename column in bytes.</dd>
671
672       <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
673       to 20 bytes wide.</dd>
674
675       <dd><code>NameWidth=<var>n</var></code> fixes the column width to
676       <var>n</var> bytes wide.</dd>
677
678       <dd><code>NameWidth=*</code> grows the column to the necessary
679       width.</dd>
680
681       <dt><a name="indexoptions.scanhtmltitles" id="indexoptions.scanhtmltitles">ScanHTMLTitles</a></dt>
682
683       <dd>This enables the extraction of the title from HTML documents
684       for fancy indexing. If the file does not have a description
685       given by <code class="directive"><a href="#adddescription">AddDescription</a></code>
686       then httpd will read the document for the value of the
687       <code>title</code> element. This is CPU and disk intensive.</dd>
688
689       <dt><a name="indexoptions.showforbidden" id="indexoptions.showforbidden">ShowForbidden</a></dt>
690
691       <dd>If specified, Apache httpd will show files normally hidden because
692       the subrequest returned <code>HTTP_UNAUTHORIZED</code> or
693       <code>HTTP_FORBIDDEN</code></dd>
694
695       <dt><a name="indexoptions.suppresscolumnsorting" id="indexoptions.suppresscolumnsorting">SuppressColumnSorting</a></dt>
696
697       <dd>If specified, Apache httpd will not make the column headings in a
698       FancyIndexed directory listing into links for sorting. The
699       default behavior is for them to be links; selecting the
700       column heading will sort the directory listing by the values
701       in that column. <strong>Prior to Apache HTTP Server 2.0.23, this also
702       disabled parsing the Query Arguments for the sort
703       string.</strong> That behavior is now controlled by <a href="#indexoptions.ignoreclient"><code>IndexOptions
704       IgnoreClient</code></a> in Apache HTTP Server 2.0.23.</dd>
705
706       <dt><a name="indexoptions.suppressdescription" id="indexoptions.suppressdescription">SuppressDescription</a></dt>
707
708       <dd>This will suppress the file description in fancy indexing
709       listings. By default, no file descriptions are defined, and
710       so the use of this option will regain 23 characters of screen
711       space to use for something else. See <code class="directive"><a href="#adddescription">AddDescription</a></code> for information about setting the file
712       description. See also the <code><a href="#indexoptions.descriptionwidth">DescriptionWidth</a></code>
713       index option to limit the size of the description column.</dd>
714
715       <dt><a name="indexoptions.suppresshtmlpreamble" id="indexoptions.suppresshtmlpreamble">SuppressHTMLPreamble</a></dt>
716
717       <dd>If the directory actually contains a file specified by the
718       <code class="directive"><a href="#headername">HeaderName</a></code>
719       directive, the module usually includes the contents of the file
720       after a standard HTML preamble (<code>&lt;html&gt;</code>,
721       <code>&lt;head&gt;</code>, <em>et cetera</em>). The
722       <code>SuppressHTMLPreamble</code> option disables this behaviour,
723       causing the module to start the display with the header file
724       contents. The header file must contain appropriate HTML instructions
725       in this case. If there is no header file, the preamble is generated
726       as usual.</dd>
727
728       <dt><a name="indexoptions.suppressicon" id="indexoptions.suppressicon">SuppressIcon</a> (<em>Apache HTTP Server
729       2.0.23 and later</em>)</dt>
730
731       <dd>This will suppress the icon in fancy indexing listings.
732       Combining both <code>SuppressIcon</code> and
733       <code>SuppressRules</code> yields proper HTML 3.2 output, which
734       by the final specification prohibits <code>img</code> and
735       <code>hr</code> elements from the <code>pre</code> block (used to
736       format FancyIndexed listings.)</dd>
737
738       <dt><a name="indexoptions.suppresslastmodified" id="indexoptions.suppresslastmodified">SuppressLastModified</a></dt>
739
740       <dd>This will suppress the display of the last modification date,
741       in fancy indexing listings.</dd>
742
743       <dt><a name="indexoptions.suppressrules" id="indexoptions.suppressrules">SuppressRules</a>
744       (<em>Apache HTTP Server 2.0.23 and later</em>)</dt>
745
746       <dd>This will suppress the horizontal rule lines (<code>hr</code>
747       elements) in directory listings. Combining both <code>SuppressIcon</code> and
748       <code>SuppressRules</code> yields proper HTML 3.2 output, which
749       by the final specification prohibits <code>img</code> and
750       <code>hr</code> elements from the <code>pre</code> block (used to
751       format FancyIndexed listings.)</dd>
752
753       <dt><a name="indexoptions.suppresssize" id="indexoptions.suppresssize">SuppressSize</a></dt>
754
755       <dd>This will suppress the file size in fancy indexing listings.</dd>
756
757       <dt><a name="indexoptions.trackmodified" id="indexoptions.trackmodified">TrackModified</a> (<em>Apache HTTP Server
758       2.0.23 and later</em>)</dt>
759
760       <dd>This returns the <code>Last-Modified</code> and <code>ETag</code>
761       values for the listed directory in the HTTP header. It is only valid
762       if the operating system and file system return appropriate stat()
763       results. Some Unix systems do so, as do OS2's JFS and Win32's
764       NTFS volumes. OS2 and Win32 FAT volumes, for example, do not.
765       Once this feature is enabled, the client or proxy can track
766       changes to the list of files when they perform a <code>HEAD</code>
767       request. Note some operating systems correctly track new and
768       removed files, but do not track changes for sizes or dates of
769       the files within the directory. <strong>Changes to the size
770       or date stamp of an existing file will not update the
771       <code>Last-Modified</code> header on all Unix platforms.</strong>
772       If this is a concern, leave this option disabled.</dd>
773
774       <dt><a name="indexoptions.type" id="indexoptions.type">Type=<var>MIME content-type</var></a> (<em>Apache HTTP Server 2.0.61 and
775       later</em>)</dt>
776
777       <dd>The <code>Type</code> keyword allows you to
778       specify the MIME content-type of the generated page. The default
779       is <var>text/html</var>.
780
781       <div class="example"><h3>Example:</h3><p><code>
782         IndexOptions Type=text/plain
783       </code></p></div>
784       </dd>
785
786       <dt><a name="indexoptions.versionsort" id="indexoptions.versionsort">VersionSort</a>
787       (<em>Apache HTTP Server 2.0a3 and later</em>)</dt>
788
789       <dd>The <code>VersionSort</code> keyword causes files containing
790       version numbers to sort in a natural way. Strings are sorted as
791       usual, except that substrings of digits in the name and
792       description are compared according to their numeric value.
793
794       <div class="example"><h3>Example:</h3><p><code>
795         foo-1.7<br />
796         foo-1.7.2<br />
797         foo-1.7.12<br />
798         foo-1.8.2<br />
799         foo-1.8.2a<br />
800         foo-1.12
801       </code></p></div>
802
803       <p>If the number starts with a zero, then it is considered to
804       be a fraction:</p>
805
806       <div class="example"><p><code>
807         foo-1.001<br />
808         foo-1.002<br />
809         foo-1.030<br />
810         foo-1.04
811       </code></p></div>
812       </dd>
813
814       <dt><a name="indexoptions.xhtml" id="indexoptions.xhtml">XHTML</a>
815       (<em>Apache HTTP Server 2.0.49 and later</em>)</dt>
816
817       <dd>The <code>XHTML</code> keyword forces <code class="module"><a href="../mod/mod_autoindex.html">mod_autoindex</a></code>
818       to emit XHTML 1.0 code instead of HTML 3.2.</dd>
819
820     </dl>
821
822    
823    <dl><dt>Incremental IndexOptions</dt>
824    <dd>
825      <p>Apache httpd 1.3.3 introduced some significant changes in the
826      handling of <code class="directive">IndexOptions</code> directives. In
827      particular:</p>
828
829      <ul>
830      <li>Multiple <code class="directive">IndexOptions</code> directives for a
831      single directory are now merged together. The result of:
832
833      <div class="example"><p><code>
834        &lt;Directory /foo&gt;
835        <span class="indent">
836          IndexOptions HTMLTable<br />
837          IndexOptions SuppressColumnsorting
838        </span>
839        &lt;/Directory&gt;
840      </code></p></div>
841
842      <p>will be the equivalent of</p>
843
844      <div class="example"><p><code>
845        IndexOptions HTMLTable SuppressColumnsorting
846      </code></p></div>
847      </li>
848
849      <li>The addition of the incremental syntax (<em>i.e.</em>, prefixing
850      keywords with <code>+</code> or <code>-</code>).</li>
851      </ul>
852
853      <p>Whenever a '+' or '-' prefixed keyword is encountered, it
854      is applied to the current <code class="directive">IndexOptions</code>
855      settings (which may have been inherited from an upper-level
856      directory). However, whenever an unprefixed keyword is processed, it
857      clears all inherited options and any incremental settings encountered
858      so far. Consider the following example:</p>
859
860      <div class="example"><p><code>
861        IndexOptions +ScanHTMLTitles -IconsAreLinks FancyIndexing<br />
862        IndexOptions +SuppressSize
863      </code></p></div>
864
865      <p>The net effect is equivalent to <code>IndexOptions FancyIndexing
866      +SuppressSize</code>, because the unprefixed <code>FancyIndexing</code>
867      discarded the incremental keywords before it, but allowed them to
868      start accumulating again afterward.</p>
869
870      <p>To unconditionally set the <code class="directive">IndexOptions</code> for
871      a particular directory, clearing the inherited settings, specify
872      keywords without any <code>+</code> or <code>-</code> prefixes.</p>
873    </dd>
874    </dl>
875
876 </div>
877 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
878 <div class="directive-section"><h2><a name="IndexOrderDefault" id="IndexOrderDefault">IndexOrderDefault</a> <a name="indexorderdefault" id="indexorderdefault">Directive</a></h2>
879 <table class="directive">
880 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Sets the default ordering of the directory index</td></tr>
881 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>IndexOrderDefault Ascending|Descending
882 Name|Date|Size|Description</code></td></tr>
883 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>IndexOrderDefault Ascending Name</code></td></tr>
884 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
885 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
886 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
887 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
888 </table>
889     <p>The <code class="directive">IndexOrderDefault</code> directive is used
890     in combination with the <code><a href="#indexoptions.fancyindexing">FancyIndexing</a></code> index option. By default, fancyindexed
891     directory listings are displayed in ascending order by filename; the
892     <code class="directive">IndexOrderDefault</code> allows you to change this
893     initial display order.</p>
894
895     <p><code class="directive">IndexOrderDefault</code> takes two
896     arguments. The first must be either <code>Ascending</code> or
897     <code>Descending</code>, indicating the direction of the sort.
898     The second argument must be one of the keywords <code>Name</code>,
899     <code>Date</code>, <code>Size</code>, or <code>Description</code>,
900     and identifies the primary key. The secondary key is
901     <em>always</em> the ascending filename.</p>
902
903     <p>You can force a directory listing to only be displayed in a
904     particular order by combining this directive with the <code><a href="#indexoptions.suppresscolumnsorting">SuppressColumnSorting</a></code> index option; this will prevent
905     the client from requesting the directory listing in a different
906     order.</p>
907
908 </div>
909 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
910 <div class="directive-section"><h2><a name="IndexStyleSheet" id="IndexStyleSheet">IndexStyleSheet</a> <a name="indexstylesheet" id="indexstylesheet">Directive</a></h2>
911 <table class="directive">
912 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Adds a CSS stylesheet to the directory index</td></tr>
913 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>IndexStyleSheet <var>url-path</var></code></td></tr>
914 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
915 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
916 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
917 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
918 </table>
919     <p>The <code class="directive">IndexStyleSheet</code> directive sets the name of
920     the file that will be used as the CSS for the index listing.
921     </p>
922     <div class="example"><h3>Example</h3><p><code>
923       
924       IndexStyleSheet "/css/style.css"
925     </code></p></div>
926
927     <p>Using this directive in conjunction with <code>IndexOptions
928     HTMLTable</code> adds a number of CSS classes to the resulting HTML.
929     The entire table is given a CSS id of <code>indexlist</code> and the
930     following classes are associated with the various parts of the
931     listing:</p>
932
933     <table>
934     <tr><th>Class</th><th>Definition</th></tr>
935     <tr><td>tr.indexhead</td><td>Header row of listing</td></tr>
936     <tr><td>th.indexcolicon and td.indexcolicon</td> <td>Icon column</td></tr>
937     <tr><td>th.indexcolname and td.indexcolname</td> <td>File name column</td></tr>
938     <tr><td>th.indexcollastmod and td.indexcollastmod</td> <td>Last modified column</td></tr>
939     <tr><td>th.indexcolsize and td.indexcolsize</td> <td>File size column</td></tr>
940     <tr><td>th.indexcoldesc and td.indexcoldesc</td> <td>Description column</td></tr>
941     <tr><td>tr.breakrow</td> <td>Horizontal rule at the bottom of the table</td></tr>
942     <tr><td>tr.odd and tr.even</td> <td>Alternating even and odd rows</td></tr>
943     </table>
944
945
946 </div>
947 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
948 <div class="directive-section"><h2><a name="ReadmeName" id="ReadmeName">ReadmeName</a> <a name="readmename" id="readmename">Directive</a></h2>
949 <table class="directive">
950 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Name of the file that will be inserted at the end
951 of the index listing</td></tr>
952 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ReadmeName <var>filename</var></code></td></tr>
953 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
954 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
955 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
956 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
957 </table>
958     <p>The <code class="directive">ReadmeName</code> directive sets the name
959     of the file that will be appended to the end of the index
960     listing. <var>Filename</var> is the name of the file to include, and
961     is taken to be relative to the location being indexed. If
962     <var>Filename</var> begins with a slash, it will be taken to be
963     relative to the <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code>.
964     </p>
965
966     <div class="example"><h3>Example</h3><p><code>
967       ReadmeName FOOTER.html
968     </code></p></div>
969
970     <div class="example"><h3>Example 2</h3><p><code>
971       ReadmeName /include/FOOTER.html
972     </code></p></div>
973
974     <p>See also <code class="directive"><a href="#headername">HeaderName</a></code>, where this behavior is described in greater
975     detail.</p>
976
977 </div>
978 </div>
979 <div class="bottomlang">
980 <p><span>Available Languages: </span><a href="../en/mod/mod_autoindex.html" title="English">&nbsp;en&nbsp;</a> |
981 <a href="../fr/mod/mod_autoindex.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
982 <a href="../ja/mod/mod_autoindex.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
983 <a href="../ko/mod/mod_autoindex.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
984 <a href="../tr/mod/mod_autoindex.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
985 </div><div id="footer">
986 <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>
987 <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>
988 </body></html>