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
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" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
12 <script src="../style/scripts/prettify.js" type="text/javascript">
15 <link href="../images/favicon.ico" rel="shortcut icon" /></head>
17 <div id="page-header">
18 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/quickreference.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
19 <p class="apache">Apache HTTP Server Version 2.5</p>
20 <img alt="" src="../images/feather.gif" /></div>
21 <div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div>
23 <a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.5</a> > <a href="./">Modules</a></div>
24 <div id="page-content">
25 <div id="preamble"><h1>Apache Module mod_autoindex</h1>
27 <p><span>Available Languages: </span><a href="../en/mod/mod_autoindex.html" title="English"> en </a> |
28 <a href="../fr/mod/mod_autoindex.html" hreflang="fr" rel="alternate" title="Français"> fr </a> |
29 <a href="../ja/mod/mod_autoindex.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
30 <a href="../ko/mod/mod_autoindex.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> |
31 <a href="../tr/mod/mod_autoindex.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p>
33 <table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Generates directory indexes,
34 automatically, similar to the Unix <code>ls</code> command or the
35 Win32 <code>dir</code> shell command</td></tr>
36 <tr><th><a href="module-dict.html#Status">Status:</a></th><td>Base</td></tr>
37 <tr><th><a href="module-dict.html#ModuleIdentifier">Module Identifier:</a></th><td>autoindex_module</td></tr>
38 <tr><th><a href="module-dict.html#SourceFile">Source File:</a></th><td>mod_autoindex.c</td></tr></table>
41 <p>The index of a directory can come from one of two
45 <li>A file located in that directory, typically called
46 <code>index.html</code>. The <code class="directive"><a href="../mod/mod_dir.html#directoryindex">DirectoryIndex</a></code> directive sets the
47 name of the file or files to be used. This is controlled by
48 <code class="module"><a href="../mod/mod_dir.html">mod_dir</a></code>.</li>
50 <li>Otherwise, a listing generated by the server. The other
51 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
52 <code class="directive"><a href="#addiconbytype">AddIconByType</a></code> are
53 used to set a list of icons to display for various file types;
54 for each file listed, the first icon listed that matches the
55 file is displayed. These are controlled by
56 <code class="module"><a href="../mod/mod_autoindex.html">mod_autoindex</a></code>.</li>
58 <p>The two functions are separated so that you can completely
59 remove (or replace) automatic index generation should you want
62 <p>Automatic index generation is enabled with using
63 <code>Options +Indexes</code>. See the
64 <code class="directive"><a href="../mod/core.html#options">Options</a></code> directive for
67 <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,
68 the column headers are links that control the order of the
69 display. If you select a header link, the listing will be
70 regenerated, sorted by the values in that column. Selecting the
71 same header repeatedly toggles between ascending and descending
72 order. These column header links are suppressed with the
73 <code class="directive"><a href="#indexoptions">IndexOptions</a></code> directive's
74 <code><a href="#indexoptions.suppresscolumnsorting">SuppressColumnSorting</a></code>
77 <p>Note that when the display is sorted by "Size", it's the
78 <em>actual</em> size of the files that's used, not the
79 displayed value - so a 1010-byte file will always be displayed
80 before a 1011-byte file (if in ascending order) even though
81 they both are shown as "1K".</p>
83 <div id="quickview"><h3 class="directives">Directives</h3>
85 <li><img alt="" src="../images/down.gif" /> <a href="#addalt">AddAlt</a></li>
86 <li><img alt="" src="../images/down.gif" /> <a href="#addaltbyencoding">AddAltByEncoding</a></li>
87 <li><img alt="" src="../images/down.gif" /> <a href="#addaltbytype">AddAltByType</a></li>
88 <li><img alt="" src="../images/down.gif" /> <a href="#adddescription">AddDescription</a></li>
89 <li><img alt="" src="../images/down.gif" /> <a href="#addicon">AddIcon</a></li>
90 <li><img alt="" src="../images/down.gif" /> <a href="#addiconbyencoding">AddIconByEncoding</a></li>
91 <li><img alt="" src="../images/down.gif" /> <a href="#addiconbytype">AddIconByType</a></li>
92 <li><img alt="" src="../images/down.gif" /> <a href="#defaulticon">DefaultIcon</a></li>
93 <li><img alt="" src="../images/down.gif" /> <a href="#headername">HeaderName</a></li>
94 <li><img alt="" src="../images/down.gif" /> <a href="#indexheadinsert">IndexHeadInsert</a></li>
95 <li><img alt="" src="../images/down.gif" /> <a href="#indexignore">IndexIgnore</a></li>
96 <li><img alt="" src="../images/down.gif" /> <a href="#indexignorereset">IndexIgnoreReset</a></li>
97 <li><img alt="" src="../images/down.gif" /> <a href="#indexoptions">IndexOptions</a></li>
98 <li><img alt="" src="../images/down.gif" /> <a href="#indexorderdefault">IndexOrderDefault</a></li>
99 <li><img alt="" src="../images/down.gif" /> <a href="#indexstylesheet">IndexStyleSheet</a></li>
100 <li><img alt="" src="../images/down.gif" /> <a href="#readmename">ReadmeName</a></li>
104 <li><img alt="" src="../images/down.gif" /> <a href="#query">Autoindex Request Query Arguments</a></li>
105 </ul><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div>
106 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
107 <div class="section">
108 <h2><a name="query" id="query">Autoindex Request Query Arguments</a></h2>
111 <p>Various query string arguments are available to give the client
112 some control over the ordering of the directory listing, as well as
113 what files are listed. If you do not wish to give the client this
114 control, the <code><a href="#indexoptions.ignoreclient">IndexOptions
115 IgnoreClient</a></code> option disables that functionality.</p>
117 <p>The column sorting headers themselves are self-referencing
118 hyperlinks that add the sort query options shown below. Any
119 option below may be added to any request for the directory
123 <li><code>C=N</code> sorts the directory by file name</li>
125 <li><code>C=M</code> sorts the directory by last-modified
126 date, then file name</li>
128 <li><code>C=S</code> sorts the directory by size, then file
131 <li class="separate"><code>C=D</code> sorts the directory by description, then
134 <li><code>O=A</code> sorts the listing in Ascending
137 <li class="separate"><code>O=D</code> sorts the listing in Descending
140 <li><code>F=0</code> formats the listing as a simple list
141 (not FancyIndexed)</li>
143 <li><code>F=1</code> formats the listing as a FancyIndexed
146 <li class="separate"><code>F=2</code> formats the listing as an
147 HTMLTable FancyIndexed list</li>
149 <li><code>V=0</code> disables version sorting</li>
151 <li class="separate"><code>V=1</code> enables version sorting</li>
153 <li><code>P=<var>pattern</var></code> lists only files matching
154 the given <var>pattern</var></li>
157 <p>Note that the 'P'attern query argument is tested
158 <em>after</em> the usual <code class="directive"><a href="#indexignore">IndexIgnore</a></code> directives are processed,
159 and all file names are still subjected to the same criteria as
160 any other autoindex listing. The Query Arguments parser in
161 <code class="module"><a href="../mod/mod_autoindex.html">mod_autoindex</a></code> will stop abruptly when an unrecognized
162 option is encountered. The Query Arguments must be well formed,
163 according to the table above.</p>
165 <p>The simple example below, which can be clipped and saved in
166 a header.html file, illustrates these query options. Note that
167 the unknown "X" argument, for the submit button, is listed last
168 to assure the arguments are all parsed before mod_autoindex
169 encounters the X=Go input.</p>
171 <div class="example"><p><code>
172 <form action="" method="get"><br />
173 <span class="indent">
174 Show me a <select name="F"><br />
175 <span class="indent">
176 <option value="0"> Plain list</option><br />
177 <option value="1" selected="selected"> Fancy list</option><br />
178 <option value="2"> Table list</option><br />
180 </select><br />
181 Sorted by <select name="C"><br />
182 <span class="indent">
183 <option value="N" selected="selected"> Name</option><br />
184 <option value="M"> Date Modified</option><br />
185 <option value="S"> Size</option><br />
186 <option value="D"> Description</option><br />
188 </select><br />
189 <select name="O"><br />
190 <span class="indent">
191 <option value="A" selected="selected"> Ascending</option><br />
192 <option value="D"> Descending</option><br />
194 </select><br />
195 <select name="V"><br />
196 <span class="indent">
197 <option value="0" selected="selected"> in Normal order</option><br />
198 <option value="1"> in Version order</option><br />
200 </select><br />
201 Matching <input type="text" name="P" value="*" /><br />
202 <input type="submit" name="X" value="Go" /><br />
208 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
209 <div class="directive-section"><h2><a name="AddAlt" id="AddAlt">AddAlt</a> <a name="addalt" id="addalt">Directive</a></h2>
210 <table class="directive">
211 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Alternate text to display for a file, instead of an
212 icon selected by filename</td></tr>
213 <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>
214 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
215 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
216 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
217 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
219 <p><code class="directive">AddAlt</code> provides the alternate text to
220 display for a file, instead of an icon, for <code><a href="#indexoptions.fancyindexing">FancyIndexing</a></code>.
221 <var>File</var> is a file extension, partial filename, wild-card
222 expression or full filename for files to describe.
223 If <var>String</var> contains any whitespace, you have to enclose it
224 in quotes (<code>"</code> or <code>'</code>). This alternate text
225 is displayed if the client is image-incapable, has image loading
226 disabled, or fails to retrieve the icon.</p>
228 <pre class="prettyprint lang-config">
229 AddAlt "PDF file" *.pdf
230 AddAlt Compressed *.gz *.zip *.Z
235 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
236 <div class="directive-section"><h2><a name="AddAltByEncoding" id="AddAltByEncoding">AddAltByEncoding</a> <a name="addaltbyencoding" id="addaltbyencoding">Directive</a></h2>
237 <table class="directive">
238 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Alternate text to display for a file instead of an icon
239 selected by MIME-encoding</td></tr>
240 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AddAltByEncoding <var>string</var> <var>MIME-encoding</var>
241 [<var>MIME-encoding</var>] ...</code></td></tr>
242 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
243 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
244 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
245 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
247 <p><code class="directive">AddAltByEncoding</code> provides the alternate
248 text to display for a file, instead of an icon, for <code><a href="#indexoptions.fancyindexing">FancyIndexing</a></code>.
249 <var>MIME-encoding</var> is a valid content-encoding, such as
250 <code>x-compress</code>. If <var>String</var> contains any whitespace,
251 you have to enclose it in quotes (<code>"</code> or <code>'</code>).
252 This alternate text is displayed if the client is image-incapable,
253 has image loading disabled, or fails to retrieve the icon.</p>
255 <pre class="prettyprint lang-config">
256 AddAltByEncoding gzip x-gzip
261 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
262 <div class="directive-section"><h2><a name="AddAltByType" id="AddAltByType">AddAltByType</a> <a name="addaltbytype" id="addaltbytype">Directive</a></h2>
263 <table class="directive">
264 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Alternate text to display for a file, instead of an
265 icon selected by MIME content-type</td></tr>
266 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AddAltByType <var>string</var> <var>MIME-type</var>
267 [<var>MIME-type</var>] ...</code></td></tr>
268 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
269 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
270 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
271 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
273 <p><code class="directive">AddAltByType</code> sets the alternate text to
274 display for a file, instead of an icon, for <code><a href="#indexoptions.fancyindexing">FancyIndexing</a></code>.
275 <var>MIME-type</var> is a valid content-type, such as
276 <code>text/html</code>. If <var>String</var> contains any whitespace,
277 you have to enclose it in quotes (<code>"</code> or <code>'</code>).
278 This alternate text is displayed if the client is image-incapable,
279 has image loading disabled, or fails to retrieve the icon.</p>
281 <pre class="prettyprint lang-config">
282 AddAltByType 'plain text' text/plain
287 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
288 <div class="directive-section"><h2><a name="AddDescription" id="AddDescription">AddDescription</a> <a name="adddescription" id="adddescription">Directive</a></h2>
289 <table class="directive">
290 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Description to display for a file</td></tr>
291 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AddDescription <var>string file</var> [<var>file</var>] ...</code></td></tr>
292 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
293 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
294 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
295 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
297 <p>This sets the description to display for a file, for
298 <code><a href="#indexoptions.fancyindexing">FancyIndexing</a></code>.
299 <var>File</var> is a file extension, partial filename, wild-card
300 expression or full filename for files to describe.
301 <var>String</var> is enclosed in double quotes (<code>"</code>).</p>
303 <pre class="prettyprint lang-config">
304 AddDescription "The planet Mars" mars.gif
305 AddDescription "My friend Marshall" friends/mars.gif
309 <p>The typical, default description field is 23 bytes wide. 6
310 more bytes are added by the <code><a href="#indexoptions.suppressicon">IndexOptions SuppressIcon</a></code> option, 7 bytes are
311 added by the <code><a href="#indexoptions.suppresssize">IndexOptions SuppressSize</a></code> option, and 19 bytes are
312 added by the <code><a href="#indexoptions.suppresslastmodified">IndexOptions SuppressLastModified</a></code> option.
313 Therefore, the widest default the description column is ever
314 assigned is 55 bytes.</p>
316 <p>Since the <var>File</var> argument may be a partial file name,
317 please remember that a too-short partial filename may match
318 unintended files. For example, <code>le.html</code> will match the
319 file <code>le.html</code> but will also match the file
320 <code>example.html</code>. In the event that there may be ambiguity,
321 use as complete a filename as you can, but keep in mind that the
322 first match encountered will be used, and order your list of
323 <code>AddDescription</code> directives accordingly.</p>
325 <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
326 of this column, or allowing descriptions of unlimited length.</p>
328 <div class="note"><h3>Caution</h3>
329 <p>Descriptive text defined with <code class="directive">AddDescription</code>
330 may contain HTML markup, such as tags and character entities. If the
331 width of the description column should happen to truncate a tagged
332 element (such as cutting off the end of a bolded phrase), the
333 results may affect the rest of the directory listing.</p>
336 <div class="note"><h3>Arguments with path information</h3>
337 <p>Absolute paths are not currently supported and do not match
338 anything at runtime. Arguments with relative path information,
339 which would normally only be used in htaccess context, are implicitly
340 prefixed with '*/' to avoid matching partial directory names.</p>
345 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
346 <div class="directive-section"><h2><a name="AddIcon" id="AddIcon">AddIcon</a> <a name="addicon" id="addicon">Directive</a></h2>
347 <table class="directive">
348 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Icon to display for a file selected by name</td></tr>
349 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AddIcon <var>icon</var> <var>name</var> [<var>name</var>]
351 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
352 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
353 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
354 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
356 <p>This sets the icon to display next to a file ending in
357 <var>name</var> for <code><a href="#indexoptions.fancyindexing">FancyIndexing</a></code>. <var>Icon</var> is either a (%-escaped)
358 relative URL to the icon, a fully qualified remote URL, or of the format <code>
359 (<var>alttext</var>,<var>url</var>)</code> where <var>alttext</var>
360 is the text tag given for an icon for non-graphical browsers.</p>
362 <p><var>Name</var> is either <code>^^DIRECTORY^^</code> for directories,
363 <code>^^BLANKICON^^</code> for blank lines (to format the list
364 correctly), a file extension, a wildcard expression, a partial
365 filename or a complete filename.</p>
367 <p><code>^^BLANKICON^^</code> is only used for formatting, and so
368 is unnecessary if you're using <code>IndexOptions
369 HTMLTable</code>.</p>
371 <pre class="prettyprint lang-config">
373 AddIcon (IMG,/icons/image.png) .gif .jpg .png
374 AddIcon /icons/dir.png ^^DIRECTORY^^
375 AddIcon /icons/backup.png *~
379 <p><code class="directive"><a href="#addiconbytype">AddIconByType</a></code>
380 should be used in preference to <code class="directive">AddIcon</code>,
384 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
385 <div class="directive-section"><h2><a name="AddIconByEncoding" id="AddIconByEncoding">AddIconByEncoding</a> <a name="addiconbyencoding" id="addiconbyencoding">Directive</a></h2>
386 <table class="directive">
387 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Icon to display next to files selected by MIME
388 content-encoding</td></tr>
389 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AddIconByEncoding <var>icon</var> <var>MIME-encoding</var>
390 [<var>MIME-encoding</var>] ...</code></td></tr>
391 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
392 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
393 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
394 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
396 <p>This sets the icon to display next to files with <code><a href="#indexoptions.fancyindexing">FancyIndexing</a></code>.
397 <var>Icon</var> is either a (%-escaped) relative URL to the icon,
398 a fully qualified remote URL,
399 or of the format <code>(<var>alttext</var>,<var>url</var>)</code>
400 where <var>alttext</var> is the text tag given for an icon for
401 non-graphical browsers.</p>
403 <p><var>MIME-encoding</var> is a valid content-encoding, such as
404 <code>x-compress</code>.</p>
406 <pre class="prettyprint lang-config">
407 AddIconByEncoding /icons/compress.png x-compress
412 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
413 <div class="directive-section"><h2><a name="AddIconByType" id="AddIconByType">AddIconByType</a> <a name="addiconbytype" id="addiconbytype">Directive</a></h2>
414 <table class="directive">
415 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Icon to display next to files selected by MIME
416 content-type</td></tr>
417 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AddIconByType <var>icon</var> <var>MIME-type</var>
418 [<var>MIME-type</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>
424 <p>This sets the icon to display next to files of type
425 <var>MIME-type</var> for <code><a href="#indexoptions.fancyindexing">FancyIndexing</a></code>.
426 <var>Icon</var> is either a (%-escaped) relative URL to the icon,
427 a fully qualified remote URL,
428 or of the format <code>(<var>alttext</var>,<var>url</var>)</code>
429 where <var>alttext</var> is the text tag given for an icon for
430 non-graphical browsers.</p>
432 <p><var>MIME-type</var> is a wildcard expression matching
433 required the mime types.</p>
435 <pre class="prettyprint lang-config">
436 AddIconByType (IMG,/icons/image.png) image/*
441 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
442 <div class="directive-section"><h2><a name="DefaultIcon" id="DefaultIcon">DefaultIcon</a> <a name="defaulticon" id="defaulticon">Directive</a></h2>
443 <table class="directive">
444 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Icon to display for files when no specific icon is
446 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DefaultIcon <var>url-path</var></code></td></tr>
447 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
448 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
449 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
450 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
452 <p>The <code class="directive">DefaultIcon</code> directive sets the icon
453 to display for files when no specific icon is known, for <code><a href="#indexoptions.fancyindexing">FancyIndexing</a></code>.
454 <var>Url-path</var> is a (%-escaped) relative URL to the icon,
455 or a fully qualified remote URL.</p>
457 <pre class="prettyprint lang-config">
458 DefaultIcon /icon/unknown.png
463 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
464 <div class="directive-section"><h2><a name="HeaderName" id="HeaderName">HeaderName</a> <a name="headername" id="headername">Directive</a></h2>
465 <table class="directive">
466 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Name of the file that will be inserted at the top
467 of the index listing</td></tr>
468 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>HeaderName <var>filename</var></code></td></tr>
469 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
470 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
471 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
472 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
474 <p>The <code class="directive">HeaderName</code> directive sets the name
475 of the file that will be inserted at the top of the index
476 listing. <var>Filename</var> is the name of the file to include.</p>
478 <pre class="prettyprint lang-config">
479 HeaderName HEADER.html
484 <p>Both HeaderName and <code class="directive"><a href="#readmename">ReadmeName</a></code> now treat
485 <var>Filename</var> as a URI path relative to the one used to
486 access the directory being indexed. If <var>Filename</var> begins
487 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>
489 <pre class="prettyprint lang-config">
490 HeaderName /include/HEADER.html
494 <p><var>Filename</var> must resolve to a document with a major
495 content type of <code>text/*</code> (<em>e.g.</em>,
496 <code>text/html</code>, <code>text/plain</code>, etc.). This means
497 that <var>filename</var> may refer to a CGI script if the script's
498 actual file type (as opposed to its output) is marked as
499 <code>text/html</code> such as with a directive like:</p>
501 <pre class="prettyprint lang-config">
502 AddType text/html .cgi
506 <p><a href="../content-negotiation.html">Content negotiation</a>
507 will be performed if <code class="directive"><a href="../mod/core.html#options">Options</a></code>
508 <code>MultiViews</code> is in effect. If <var>filename</var> resolves
509 to a static <code>text/html</code> document (not a CGI script) and
510 either one of the <code class="directive"><a href="../mod/core.html#options">options</a></code>
511 <code>Includes</code> or <code>IncludesNOEXEC</code> is enabled,
512 the file will be processed for server-side includes (see the
513 <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> documentation).</p>
516 <p>If the file specified by <code class="directive">HeaderName</code> contains
517 the beginnings of an HTML document (<html>, <head>, etc.)
518 then you will probably want to set <a href="#indexoptions.suppresshtmlpreamble"><code>IndexOptions
519 +SuppressHTMLPreamble</code></a>, so that these tags are not
524 <li><code class="directive"><a href="#readmename">ReadmeName</a></code></li>
527 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
528 <div class="directive-section"><h2><a name="IndexHeadInsert" id="IndexHeadInsert">IndexHeadInsert</a> <a name="indexheadinsert" id="indexheadinsert">Directive</a></h2>
529 <table class="directive">
530 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Inserts text in the HEAD section of an index page.</td></tr>
531 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>IndexHeadInsert <var>"markup ..."</var></code></td></tr>
532 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
533 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
534 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
535 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
537 <p>The <code class="directive">IndexHeadInsert</code> directive specifies a
538 string to insert in the <var><head></var> section of the HTML
539 generated for the index page.</p>
540 <pre class="prettyprint lang-config">
541 IndexHeadInsert "<link rel=\"sitemap\" href=\"/sitemap.html\">"
546 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
547 <div class="directive-section"><h2><a name="IndexIgnore" id="IndexIgnore">IndexIgnore</a> <a name="indexignore" id="indexignore">Directive</a></h2>
548 <table class="directive">
549 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Adds to the list of files to hide when listing
550 a directory</td></tr>
551 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>IndexIgnore <var>file</var> [<var>file</var>] ...</code></td></tr>
552 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>IndexIgnore "."</code></td></tr>
553 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
554 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
555 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
556 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
558 <p>The <code class="directive">IndexIgnore</code> directive adds to the
559 list of files to hide when listing a directory. <var>File</var> is a
560 shell-style wildcard expression or full
561 filename. Multiple IndexIgnore directives add
562 to the list, rather than the replacing the list of ignored
563 files. By default, the list contains <code>.</code> (the current
566 <pre class="prettyprint lang-config">
567 IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
571 <div class="note"><h3>Regular Expressions</h3>
572 <p>This directive does not currently work in configuration sections
573 that have regular expression arguments, such as <code class="directive"><a href="../mod/core.html#directorymatch"><DirectoryMatch></a></code>
578 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
579 <div class="directive-section"><h2><a name="IndexIgnoreReset" id="IndexIgnoreReset">IndexIgnoreReset</a> <a name="indexignorereset" id="indexignorereset">Directive</a></h2>
580 <table class="directive">
581 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Empties the list of files to hide when listing
582 a directory</td></tr>
583 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>IndexIgnoreReset ON|OFF</code></td></tr>
584 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
585 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
586 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
587 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
588 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>2.3.10 and later</td></tr>
590 <p>The <code class="directive">IndexIgnoreReset</code> directive removes
591 any files ignored by <code class="directive">IndexIgnore</code> otherwise
592 inherited from other configuration sections. </p>
594 <pre class="prettyprint lang-config">
595 <Directory /var/www>
596 IndexIgnore *.bak .??* *~ *# HEADER* README* RCS CVS *,v *,t
598 <Directory /var/www/backups>
600 IndexIgnore .??* *# HEADER* README* RCS CVS *,v *,t
605 <div class="warning"><p> Review the default configuration for a list of
606 patterns that you might want to explicitly ignore after using this
610 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
611 <div class="directive-section"><h2><a name="IndexOptions" id="IndexOptions">IndexOptions</a> <a name="indexoptions" id="indexoptions">Directive</a></h2>
612 <table class="directive">
613 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Various configuration settings for directory
615 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>IndexOptions [+|-]<var>option</var> [[+|-]<var>option</var>]
617 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>By default, no options are enabled.</code></td></tr>
618 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
619 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
620 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
621 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
623 <p>The <code class="directive">IndexOptions</code> directive specifies the
624 behavior of the directory indexing. <var>Option</var> can be one
628 <dt><a name="indexoptions.addaltclass" id="indexoptions.addaltclass">AddAltClass</a></dt>
629 <dd>Adds an additional CSS class declaration to each row of the
630 directory listing table when <code>IndexOptions HTMLTable</code>
631 is in effect and an <code>IndexStyleSheet</code> is defined.
632 Rather than the standard <code>even</code> and <code>odd</code>
633 classes that would otherwise be applied to each row of the table,
634 a class of <code>even-<em>ALT</em></code> or
635 <code>odd-<em>ALT</em></code> where <em>ALT</em> is either the
636 standard alt text associated with the file style (eg. <em>snd</em>,
637 <em>txt</em>, <em>img</em>, etc) or the alt text defined by one of
638 the various <code>AddAlt*</code> directives.
641 <dt><a name="indexoptions.charset" id="indexoptions.charset">Charset=<var>character-set</var></a> (<em>Apache HTTP Server 2.0.61 and
644 <dd>The <code>Charset</code> keyword allows you to
645 specify the character set of the generated page. The
646 default is <code>UTF-8</code> on Windows and Mac OS X,
647 and <code>ISO-8859-1</code> elsewhere.
648 (It depends on whether the underlying file system
649 uses Unicode filenames or not.)
651 <pre class="prettyprint lang-config">
652 IndexOptions Charset=UTF-8
657 <dt><a name="indexoptions.descriptionwidth" id="indexoptions.descriptionwidth">DescriptionWidth=[<var>n</var> | *]</a></dt>
659 <dd>The <code>DescriptionWidth</code> keyword allows you to
660 specify the width of the description column in
663 <dd><code>-DescriptionWidth</code> (or unset) allows
664 <code class="module"><a href="../mod/mod_autoindex.html">mod_autoindex</a></code> to calculate the best width.</dd>
666 <dd><code>DescriptionWidth=<var>n</var></code> fixes the column width to
667 <var>n</var> bytes wide.</dd>
669 <dd><code>DescriptionWidth=*</code> grows the column to the
670 width necessary to accommodate the longest description
673 <dd><strong>See the section on <code class="directive"><a href="#adddescription">AddDescription</a></code> for dangers
674 inherent in truncating descriptions.</strong></dd>
676 <dt><a name="indexoptions.fancyindexing" id="indexoptions.fancyindexing">FancyIndexing</a></dt>
678 <dd>This turns on fancy indexing of directories.</dd>
680 <dt><a name="indexoptions.foldersfirst" id="indexoptions.foldersfirst">FoldersFirst</a></dt>
682 <dd>If this option is enabled, subdirectory listings will
683 <em>always</em> appear first, followed by normal files in the
684 directory. The listing is basically broken into two
685 components, the files and the subdirectories, and each is
686 sorted separately and then displayed subdirectories-first.
687 For instance, if the sort order is descending by name, and
688 <code>FoldersFirst</code> is enabled, subdirectory
689 <code>Zed</code> will be listed before subdirectory
690 <code>Beta</code>, which will be listed before normal files
691 <code>Gamma</code> and <code>Alpha</code>. <strong>This option
692 only has an effect if <a href="#indexoptions.fancyindexing"><code>FancyIndexing</code></a> is also enabled.</strong></dd>
694 <dt><a name="indexoptions.htmltable" id="indexoptions.htmltable">HTMLTable</a></dt>
696 <dd>This option with <code>FancyIndexing</code> constructs
697 a simple table for the fancy directory listing.
698 It is necessary for utf-8 enabled platforms or if file
699 names or description text will alternate between
700 left-to-right and right-to-left reading order.</dd>
702 <dt><a name="indexoptions.iconsarelinks" id="indexoptions.iconsarelinks">IconsAreLinks</a></dt>
704 <dd>This makes the icons part of the anchor for the filename, for
707 <dt><a name="indexoptions.iconheight" id="indexoptions.iconheight">IconHeight[=<var>pixels</var>]</a></dt>
709 <dd>Presence of this option, when used with <code>IconWidth</code>,
710 will cause the server to include <code>height</code> and
711 <code>width</code> attributes in the <code>img</code> tag for the file
712 icon. This allows browser to precalculate the page layout without having
713 to wait until all the images have been loaded. If no value is given for
714 the option, it defaults to the standard height of the icons supplied
715 with the Apache httpd software.</dd>
717 <dt><a name="indexoptions.iconwidth" id="indexoptions.iconwidth">IconWidth[=<var>pixels</var>]</a></dt>
719 <dd>Presence of this option, when used with <code>IconHeight</code>,
720 will cause the server to include <code>height</code> and
721 <code>width</code> attributes in the <code>img</code> tag for
722 the file icon. This allows browser to precalculate the page
723 layout without having to wait until all the images have been
724 loaded. If no value is given for the option, it defaults to
725 the standard width of the icons supplied with the Apache httpd
728 <dt><a name="indexoptions.ignorecase" id="indexoptions.ignorecase">IgnoreCase</a></dt>
730 <dd>If this option is enabled, names are sorted in a case-insensitive
731 manner. For instance, if the sort order is ascending by name, and
732 <code>IgnoreCase</code> is enabled, file Zeta will be listed after
733 file alfa (Note: file GAMMA will always be listed before file gamma).
736 <dt><a name="indexoptions.ignoreclient" id="indexoptions.ignoreclient">IgnoreClient</a></dt>
738 <dd>This option causes <code class="module"><a href="../mod/mod_autoindex.html">mod_autoindex</a></code> to ignore all
739 query variables from the client, including sort order (implies
740 <code><a href="#indexoptions.suppresscolumnsorting">SuppressColumnSorting</a></code>.)</dd>
742 <dt><a name="indexoptions.namewidth" id="indexoptions.namewidth">NameWidth=[<var>n</var>
745 <dd>The <code>NameWidth</code> keyword allows you to specify the width
746 of the filename column in bytes.</dd>
748 <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
749 to 20 bytes wide.</dd>
751 <dd><code>NameWidth=<var>n</var></code> fixes the column width to
752 <var>n</var> bytes wide.</dd>
754 <dd><code>NameWidth=*</code> grows the column to the necessary
757 <dt><a name="indexoptions.scanhtmltitles" id="indexoptions.scanhtmltitles">ScanHTMLTitles</a></dt>
759 <dd>This enables the extraction of the title from HTML documents
760 for fancy indexing. If the file does not have a description
761 given by <code class="directive"><a href="#adddescription">AddDescription</a></code>
762 then httpd will read the document for the value of the
763 <code>title</code> element. This is CPU and disk intensive.</dd>
765 <dt><a name="indexoptions.showforbidden" id="indexoptions.showforbidden">ShowForbidden</a></dt>
767 <dd>If specified, Apache httpd will show files normally hidden because
768 the subrequest returned <code>HTTP_UNAUTHORIZED</code> or
769 <code>HTTP_FORBIDDEN</code></dd>
771 <dt><a name="indexoptions.suppresscolumnsorting" id="indexoptions.suppresscolumnsorting">SuppressColumnSorting</a></dt>
773 <dd>If specified, Apache httpd will not make the column headings in a
774 FancyIndexed directory listing into links for sorting. The
775 default behavior is for them to be links; selecting the
776 column heading will sort the directory listing by the values
777 in that column. However, query string arguments which are appended
778 to the URL will still be honored. That behavior is controlled by <a href="#indexoptions.ignoreclient"><code>IndexOptions
779 IgnoreClient</code></a>.</dd>
781 <dt><a name="indexoptions.suppressdescription" id="indexoptions.suppressdescription">SuppressDescription</a></dt>
783 <dd>This will suppress the file description in fancy indexing
784 listings. By default, no file descriptions are defined, and
785 so the use of this option will regain 23 characters of screen
786 space to use for something else. See <code class="directive"><a href="#adddescription">AddDescription</a></code> for information about setting the file
787 description. See also the <code><a href="#indexoptions.descriptionwidth">DescriptionWidth</a></code>
788 index option to limit the size of the description column.</dd>
790 <dt><a name="indexoptions.suppresshtmlpreamble" id="indexoptions.suppresshtmlpreamble">SuppressHTMLPreamble</a></dt>
792 <dd>If the directory actually contains a file specified by the
793 <code class="directive"><a href="#headername">HeaderName</a></code>
794 directive, the module usually includes the contents of the file
795 after a standard HTML preamble (<code><html></code>,
796 <code><head></code>, <em>et cetera</em>). The
797 <code>SuppressHTMLPreamble</code> option disables this behaviour,
798 causing the module to start the display with the header file
799 contents. The header file must contain appropriate HTML instructions
800 in this case. If there is no header file, the preamble is generated
801 as usual. If you also specify a <code class="directive"><a href="#readmename">ReadmeName</a></code>, and if that file
802 exists, The closing </body></html> tags are also
803 ommitted from the output, under the assumption that you'll likely
804 put those closing tags in that file.</dd>
806 <dt><a name="indexoptions.suppressicon" id="indexoptions.suppressicon">SuppressIcon</a></dt>
808 <dd>This will suppress the icon in fancy indexing listings.
809 Combining both <code>SuppressIcon</code> and
810 <code>SuppressRules</code> yields proper HTML 3.2 output, which
811 by the final specification prohibits <code>img</code> and
812 <code>hr</code> elements from the <code>pre</code> block (used to
813 format FancyIndexed listings.)</dd>
815 <dt><a name="indexoptions.suppresslastmodified" id="indexoptions.suppresslastmodified">SuppressLastModified</a></dt>
817 <dd>This will suppress the display of the last modification date,
818 in fancy indexing listings.</dd>
820 <dt><a name="indexoptions.suppressrules" id="indexoptions.suppressrules">SuppressRules</a>
823 <dd>This will suppress the horizontal rule lines (<code>hr</code>
824 elements) in directory listings. Combining both <code>SuppressIcon</code> and
825 <code>SuppressRules</code> yields proper HTML 3.2 output, which
826 by the final specification prohibits <code>img</code> and
827 <code>hr</code> elements from the <code>pre</code> block (used to
828 format FancyIndexed listings.)</dd>
830 <dt><a name="indexoptions.suppresssize" id="indexoptions.suppresssize">SuppressSize</a></dt>
832 <dd>This will suppress the file size in fancy indexing listings.</dd>
834 <dt><a name="indexoptions.trackmodified" id="indexoptions.trackmodified">TrackModified</a></dt>
836 <dd>This returns the <code>Last-Modified</code> and <code>ETag</code>
837 values for the listed directory in the HTTP header. It is only valid
838 if the operating system and file system return appropriate stat()
839 results. Some Unix systems do so, as do OS2's JFS and Win32's
840 NTFS volumes. OS2 and Win32 FAT volumes, for example, do not.
841 Once this feature is enabled, the client or proxy can track
842 changes to the list of files when they perform a <code>HEAD</code>
843 request. Note some operating systems correctly track new and
844 removed files, but do not track changes for sizes or dates of
845 the files within the directory. <strong>Changes to the size
846 or date stamp of an existing file will not update the
847 <code>Last-Modified</code> header on all Unix platforms.</strong>
848 If this is a concern, leave this option disabled.</dd>
850 <dt><a name="indexoptions.type" id="indexoptions.type">Type=<var>MIME content-type</var></a> (<em>Apache HTTP Server 2.0.61 and
853 <dd>The <code>Type</code> keyword allows you to
854 specify the MIME content-type of the generated page. The default
855 is <var>text/html</var>.
857 <pre class="prettyprint lang-config">
858 IndexOptions Type=text/plain
863 <dt><a name="indexoptions.versionsort" id="indexoptions.versionsort">VersionSort</a>
864 (<em>Apache HTTP Server 2.0a3 and later</em>)</dt>
866 <dd>The <code>VersionSort</code> keyword causes files containing
867 version numbers to sort in a natural way. Strings are sorted as
868 usual, except that substrings of digits in the name and
869 description are compared according to their numeric value.
871 <div class="example"><h3>Example:</h3><p><code>
880 <p>If the number starts with a zero, then it is considered to
883 <div class="example"><p><code>
891 <dt><a name="indexoptions.xhtml" id="indexoptions.xhtml">XHTML</a>
892 (<em>Apache HTTP Server 2.0.49 and later</em>)</dt>
894 <dd>The <code>XHTML</code> keyword forces <code class="module"><a href="../mod/mod_autoindex.html">mod_autoindex</a></code>
895 to emit XHTML 1.0 code instead of HTML 3.2.</dd>
900 <dl><dt>Incremental IndexOptions</dt>
902 <p>Be aware of how multiple <code class="directive">IndexOptions</code> are
906 <li>Multiple <code class="directive">IndexOptions</code> directives for a
907 single directory are now merged together. The result of:
909 <pre class="prettyprint lang-config">
910 <Directory /foo>
911 IndexOptions HTMLTable
912 IndexOptions SuppressColumnsorting
917 <p>will be the equivalent of</p>
919 <pre class="prettyprint lang-config">
920 IndexOptions HTMLTable SuppressColumnsorting
925 <li>The addition of the incremental syntax (<em>i.e.</em>, prefixing
926 keywords with <code>+</code> or <code>-</code>).</li>
929 <p>Whenever a '+' or '-' prefixed keyword is encountered, it
930 is applied to the current <code class="directive">IndexOptions</code>
931 settings (which may have been inherited from an upper-level
932 directory). However, whenever an unprefixed keyword is processed, it
933 clears all inherited options and any incremental settings encountered
934 so far. Consider the following example:</p>
936 <pre class="prettyprint lang-config">
937 IndexOptions +ScanHTMLTitles -IconsAreLinks FancyIndexing<br />
938 IndexOptions +SuppressSize
942 <p>The net effect is equivalent to <code>IndexOptions FancyIndexing
943 +SuppressSize</code>, because the unprefixed <code>FancyIndexing</code>
944 discarded the incremental keywords before it, but allowed them to
945 start accumulating again afterward.</p>
947 <p>To unconditionally set the <code class="directive">IndexOptions</code> for
948 a particular directory, clearing the inherited settings, specify
949 keywords without any <code>+</code> or <code>-</code> prefixes.</p>
954 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
955 <div class="directive-section"><h2><a name="IndexOrderDefault" id="IndexOrderDefault">IndexOrderDefault</a> <a name="indexorderdefault" id="indexorderdefault">Directive</a></h2>
956 <table class="directive">
957 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Sets the default ordering of the directory index</td></tr>
958 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>IndexOrderDefault Ascending|Descending
959 Name|Date|Size|Description</code></td></tr>
960 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>IndexOrderDefault Ascending Name</code></td></tr>
961 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
962 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
963 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
964 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
966 <p>The <code class="directive">IndexOrderDefault</code> directive is used
967 in combination with the <code><a href="#indexoptions.fancyindexing">FancyIndexing</a></code> index option. By default, fancyindexed
968 directory listings are displayed in ascending order by filename; the
969 <code class="directive">IndexOrderDefault</code> allows you to change this
970 initial display order.</p>
972 <p><code class="directive">IndexOrderDefault</code> takes two
973 arguments. The first must be either <code>Ascending</code> or
974 <code>Descending</code>, indicating the direction of the sort.
975 The second argument must be one of the keywords <code>Name</code>,
976 <code>Date</code>, <code>Size</code>, or <code>Description</code>,
977 and identifies the primary key. The secondary key is
978 <em>always</em> the ascending filename.</p>
980 <p>You can, if desired, prevent the client from reordering the list
981 by also adding the <code><a href="#indexoptions.suppresscolumnsorting">SuppressColumnSorting</a></code>
982 index option to remove the sort link from the top of the column,
983 along with the <code><a href="#indexoptions.ignoreclient">IgnoreClient</a></code> index
984 option to prevent them from manually adding sort options to the
985 query string in order to override your ordering preferences.</p>
988 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
989 <div class="directive-section"><h2><a name="IndexStyleSheet" id="IndexStyleSheet">IndexStyleSheet</a> <a name="indexstylesheet" id="indexstylesheet">Directive</a></h2>
990 <table class="directive">
991 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Adds a CSS stylesheet to the directory index</td></tr>
992 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>IndexStyleSheet <var>url-path</var></code></td></tr>
993 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
994 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
995 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
996 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
998 <p>The <code class="directive">IndexStyleSheet</code> directive sets the name of
999 the file that will be used as the CSS for the index listing.
1001 <pre class="prettyprint lang-config">
1002 IndexStyleSheet "/css/style.css"
1006 <p>Using this directive in conjunction with <code>IndexOptions
1007 HTMLTable</code> adds a number of CSS classes to the resulting HTML.
1008 The entire table is given a CSS id of <code>indexlist</code> and the
1009 following classes are associated with the various parts of the
1012 <table class="bordered"><tr class="header"><th>Class</th><th>Definition</th></tr>
1013 <tr><td>tr.indexhead</td><td>Header row of listing</td></tr>
1014 <tr class="odd"><td>th.indexcolicon and td.indexcolicon</td> <td>Icon column</td></tr>
1015 <tr><td>th.indexcolname and td.indexcolname</td> <td>File name column</td></tr>
1016 <tr class="odd"><td>th.indexcollastmod and td.indexcollastmod</td> <td>Last modified column</td></tr>
1017 <tr><td>th.indexcolsize and td.indexcolsize</td> <td>File size column</td></tr>
1018 <tr class="odd"><td>th.indexcoldesc and td.indexcoldesc</td> <td>Description column</td></tr>
1019 <tr><td>tr.breakrow</td> <td>Horizontal rule at the bottom of the table</td></tr>
1020 <tr class="odd"><td>tr.odd and tr.even</td> <td>Alternating even and odd rows</td></tr>
1025 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1026 <div class="directive-section"><h2><a name="ReadmeName" id="ReadmeName">ReadmeName</a> <a name="readmename" id="readmename">Directive</a></h2>
1027 <table class="directive">
1028 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Name of the file that will be inserted at the end
1029 of the index listing</td></tr>
1030 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ReadmeName <var>filename</var></code></td></tr>
1031 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1032 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
1033 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
1034 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
1036 <p>The <code class="directive">ReadmeName</code> directive sets the name
1037 of the file that will be appended to the end of the index
1038 listing. <var>Filename</var> is the name of the file to include, and
1039 is taken to be relative to the location being indexed. If
1040 <var>Filename</var> begins with a slash, as in example 2, it will be taken to be
1041 relative to the <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code>.
1044 <pre class="prettyprint lang-config">
1046 ReadmeName FOOTER.html
1050 <pre class="prettyprint lang-config">
1052 ReadmeName /include/FOOTER.html
1056 <p>See also <code class="directive"><a href="#headername">HeaderName</a></code>, where this behavior is described in greater
1061 <div class="bottomlang">
1062 <p><span>Available Languages: </span><a href="../en/mod/mod_autoindex.html" title="English"> en </a> |
1063 <a href="../fr/mod/mod_autoindex.html" hreflang="fr" rel="alternate" title="Français"> fr </a> |
1064 <a href="../ja/mod/mod_autoindex.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
1065 <a href="../ko/mod/mod_autoindex.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> |
1066 <a href="../tr/mod/mod_autoindex.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p>
1067 </div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
1068 <script type="text/javascript"><!--//--><![CDATA[//><!--
1069 var comments_shortname = 'httpd';
1070 var comments_identifier = 'http://httpd.apache.org/docs/trunk/mod/mod_autoindex.html';
1072 if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
1073 d.write('<div id="comments_thread"><\/div>');
1074 var s = d.createElement('script');
1075 s.type = 'text/javascript';
1077 s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
1078 (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
1081 d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
1083 })(window, document);
1084 //--><!]]></script></div><div id="footer">
1085 <p class="apache">Copyright 2014 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>
1086 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/quickreference.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
1087 if (typeof(prettyPrint) !== 'undefined') {