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 <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
6 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
7 This file is generated from xml source: DO NOT EDIT
8 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
10 <title>mod_autoindex - Apache HTTP Server Version 2.5</title>
11 <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
12 <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
13 <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" />
14 <script src="../style/scripts/prettify.min.js" type="text/javascript">
17 <link href="../images/favicon.ico" rel="shortcut icon" /></head>
19 <div id="page-header">
20 <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>
21 <p class="apache">Apache HTTP Server Version 2.5</p>
22 <img alt="" src="../images/feather.png" /></div>
23 <div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div>
25 <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>
26 <div id="page-content">
27 <div id="preamble"><h1>Apache Module mod_autoindex</h1>
29 <p><span>Available Languages: </span><a href="../en/mod/mod_autoindex.html" title="English"> en </a> |
30 <a href="../fr/mod/mod_autoindex.html" hreflang="fr" rel="alternate" title="Français"> fr </a> |
31 <a href="../ja/mod/mod_autoindex.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
32 <a href="../ko/mod/mod_autoindex.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> |
33 <a href="../tr/mod/mod_autoindex.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p>
35 <table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Generates directory indexes,
36 automatically, similar to the Unix <code>ls</code> command or the
37 Win32 <code>dir</code> shell command</td></tr>
38 <tr><th><a href="module-dict.html#Status">Status:</a></th><td>Base</td></tr>
39 <tr><th><a href="module-dict.html#ModuleIdentifier">Module Identifier:</a></th><td>autoindex_module</td></tr>
40 <tr><th><a href="module-dict.html#SourceFile">Source File:</a></th><td>mod_autoindex.c</td></tr></table>
43 <p>The index of a directory can come from one of two
47 <li>A file located in that directory, typically called
48 <code>index.html</code>. The <code class="directive"><a href="../mod/mod_dir.html#directoryindex">DirectoryIndex</a></code> directive sets the
49 name of the file or files to be used. This is controlled by
50 <code class="module"><a href="../mod/mod_dir.html">mod_dir</a></code>.</li>
52 <li>Otherwise, a listing generated by the server. The other
53 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
54 <code class="directive"><a href="#addiconbytype">AddIconByType</a></code> are
55 used to set a list of icons to display for various file types;
56 for each file listed, the first icon listed that matches the
57 file is displayed. These are controlled by
58 <code class="module"><a href="../mod/mod_autoindex.html">mod_autoindex</a></code>.</li>
60 <p>The two functions are separated so that you can completely
61 remove (or replace) automatic index generation should you want
64 <p>Automatic index generation is enabled with using
65 <code>Options +Indexes</code>. See the
66 <code class="directive"><a href="../mod/core.html#options">Options</a></code> directive for
69 <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,
70 the column headers are links that control the order of the
71 display. If you select a header link, the listing will be
72 regenerated, sorted by the values in that column. Selecting the
73 same header repeatedly toggles between ascending and descending
74 order. These column header links are suppressed with the
75 <code class="directive"><a href="#indexoptions">IndexOptions</a></code> directive's
76 <code><a href="#indexoptions.suppresscolumnsorting">SuppressColumnSorting</a></code>
79 <p>Note that when the display is sorted by "Size", it's the
80 <em>actual</em> size of the files that's used, not the
81 displayed value - so a 1010-byte file will always be displayed
82 before a 1011-byte file (if in ascending order) even though
83 they both are shown as "1K".</p>
85 <div id="quickview"><h3>Topics</h3>
87 <li><img alt="" src="../images/down.gif" /> <a href="#query">Autoindex Request Query Arguments</a></li>
88 </ul><h3 class="directives">Directives</h3>
90 <li><img alt="" src="../images/down.gif" /> <a href="#addalt">AddAlt</a></li>
91 <li><img alt="" src="../images/down.gif" /> <a href="#addaltbyencoding">AddAltByEncoding</a></li>
92 <li><img alt="" src="../images/down.gif" /> <a href="#addaltbytype">AddAltByType</a></li>
93 <li><img alt="" src="../images/down.gif" /> <a href="#adddescription">AddDescription</a></li>
94 <li><img alt="" src="../images/down.gif" /> <a href="#addicon">AddIcon</a></li>
95 <li><img alt="" src="../images/down.gif" /> <a href="#addiconbyencoding">AddIconByEncoding</a></li>
96 <li><img alt="" src="../images/down.gif" /> <a href="#addiconbytype">AddIconByType</a></li>
97 <li><img alt="" src="../images/down.gif" /> <a href="#defaulticon">DefaultIcon</a></li>
98 <li><img alt="" src="../images/down.gif" /> <a href="#headername">HeaderName</a></li>
99 <li><img alt="" src="../images/down.gif" /> <a href="#indexheadinsert">IndexHeadInsert</a></li>
100 <li><img alt="" src="../images/down.gif" /> <a href="#indexignore">IndexIgnore</a></li>
101 <li><img alt="" src="../images/down.gif" /> <a href="#indexignorereset">IndexIgnoreReset</a></li>
102 <li><img alt="" src="../images/down.gif" /> <a href="#indexoptions">IndexOptions</a></li>
103 <li><img alt="" src="../images/down.gif" /> <a href="#indexorderdefault">IndexOrderDefault</a></li>
104 <li><img alt="" src="../images/down.gif" /> <a href="#indexstylesheet">IndexStyleSheet</a></li>
105 <li><img alt="" src="../images/down.gif" /> <a href="#readmename">ReadmeName</a></li>
107 <h3>Bugfix checklist</h3><ul class="seealso"><li><a href="https://www.apache.org/dist/httpd/CHANGES_2.4">httpd changelog</a></li><li><a href="https://bz.apache.org/bugzilla/buglist.cgi?bug_status=__open__&list_id=144532&product=Apache%20httpd-2&query_format=specific&order=changeddate%20DESC%2Cpriority%2Cbug_severity&component=mod_autoindex">Known issues</a></li><li><a href="https://bz.apache.org/bugzilla/enter_bug.cgi?product=Apache%20httpd-2&component=mod_autoindex">Report a bug</a></li></ul><h3>See also</h3>
109 <li><a href="#comments_section">Comments</a></li></ul></div>
110 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
111 <div class="section">
112 <h2><a name="query" id="query">Autoindex Request Query Arguments</a></h2>
115 <p>Various query string arguments are available to give the client
116 some control over the ordering of the directory listing, as well as
117 what files are listed. If you do not wish to give the client this
118 control, the <code><a href="#indexoptions.ignoreclient">IndexOptions
119 IgnoreClient</a></code> option disables that functionality.</p>
121 <p>The column sorting headers themselves are self-referencing
122 hyperlinks that add the sort query options shown below. Any
123 option below may be added to any request for the directory
127 <li><code>C=N</code> sorts the directory by file name</li>
129 <li><code>C=M</code> sorts the directory by last-modified
130 date, then file name</li>
132 <li><code>C=S</code> sorts the directory by size, then file
135 <li class="separate"><code>C=D</code> sorts the directory by description, then
138 <li><code>O=A</code> sorts the listing in Ascending
141 <li class="separate"><code>O=D</code> sorts the listing in Descending
144 <li><code>F=0</code> formats the listing as a simple list
145 (not FancyIndexed)</li>
147 <li><code>F=1</code> formats the listing as a FancyIndexed
150 <li class="separate"><code>F=2</code> formats the listing as an
151 HTMLTable FancyIndexed list</li>
153 <li><code>V=0</code> disables version sorting</li>
155 <li class="separate"><code>V=1</code> enables version sorting</li>
157 <li><code>P=<var>pattern</var></code> lists only files matching
158 the given <var>pattern</var></li>
161 <p>Note that the 'P'attern query argument is tested
162 <em>after</em> the usual <code class="directive"><a href="#indexignore">IndexIgnore</a></code> directives are processed,
163 and all file names are still subjected to the same criteria as
164 any other autoindex listing. The Query Arguments parser in
165 <code class="module"><a href="../mod/mod_autoindex.html">mod_autoindex</a></code> will stop abruptly when an unrecognized
166 option is encountered. The Query Arguments must be well formed,
167 according to the table above.</p>
169 <p>The simple example below, which can be clipped and saved in
170 a header.html file, illustrates these query options. Note that
171 the unknown "X" argument, for the submit button, is listed last
172 to assure the arguments are all parsed before mod_autoindex
173 encounters the X=Go input.</p>
175 <div class="example"><p><code>
176 <form action="" method="get"><br />
177 <span class="indent">
178 Show me a <select name="F"><br />
179 <span class="indent">
180 <option value="0"> Plain list</option><br />
181 <option value="1" selected="selected"> Fancy list</option><br />
182 <option value="2"> Table list</option><br />
184 </select><br />
185 Sorted by <select name="C"><br />
186 <span class="indent">
187 <option value="N" selected="selected"> Name</option><br />
188 <option value="M"> Date Modified</option><br />
189 <option value="S"> Size</option><br />
190 <option value="D"> Description</option><br />
192 </select><br />
193 <select name="O"><br />
194 <span class="indent">
195 <option value="A" selected="selected"> Ascending</option><br />
196 <option value="D"> Descending</option><br />
198 </select><br />
199 <select name="V"><br />
200 <span class="indent">
201 <option value="0" selected="selected"> in Normal order</option><br />
202 <option value="1"> in Version order</option><br />
204 </select><br />
205 Matching <input type="text" name="P" value="*" /><br />
206 <input type="submit" name="X" value="Go" /><br />
212 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
213 <div class="directive-section"><h2><a name="AddAlt" id="AddAlt">AddAlt</a> <a name="addalt" id="addalt">Directive</a></h2>
214 <table class="directive">
215 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Alternate text to display for a file, instead of an
216 icon selected by filename</td></tr>
217 <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>
218 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
219 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
220 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
221 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
223 <p><code class="directive">AddAlt</code> provides the alternate text to
224 display for a file, instead of an icon, for <code><a href="#indexoptions.fancyindexing">FancyIndexing</a></code>.
225 <var>File</var> is a file extension, partial filename, wild-card
226 expression or full filename for files to describe.
227 If <var>String</var> contains any whitespace, you have to enclose it
228 in quotes (<code>"</code> or <code>'</code>). This alternate text
229 is displayed if the client is image-incapable, has image loading
230 disabled, or fails to retrieve the icon.</p>
232 <pre class="prettyprint lang-config">AddAlt "PDF file" *.pdf
233 AddAlt Compressed *.gz *.zip *.Z</pre>
237 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
238 <div class="directive-section"><h2><a name="AddAltByEncoding" id="AddAltByEncoding">AddAltByEncoding</a> <a name="addaltbyencoding" id="addaltbyencoding">Directive</a></h2>
239 <table class="directive">
240 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Alternate text to display for a file instead of an icon
241 selected by MIME-encoding</td></tr>
242 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AddAltByEncoding <var>string</var> <var>MIME-encoding</var>
243 [<var>MIME-encoding</var>] ...</code></td></tr>
244 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
245 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
246 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
247 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
249 <p><code class="directive">AddAltByEncoding</code> provides the alternate
250 text to display for a file, instead of an icon, for <code><a href="#indexoptions.fancyindexing">FancyIndexing</a></code>.
251 <var>MIME-encoding</var> is a valid content-encoding, such as
252 <code>x-compress</code>. If <var>String</var> contains any whitespace,
253 you have to enclose it in quotes (<code>"</code> or <code>'</code>).
254 This alternate text is displayed if the client is image-incapable,
255 has image loading disabled, or fails to retrieve the icon.</p>
257 <pre class="prettyprint lang-config">AddAltByEncoding gzip x-gzip</pre>
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">AddAltByType 'plain text' text/plain</pre>
285 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
286 <div class="directive-section"><h2><a name="AddDescription" id="AddDescription">AddDescription</a> <a name="adddescription" id="adddescription">Directive</a></h2>
287 <table class="directive">
288 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Description to display for a file</td></tr>
289 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AddDescription <var>string file</var> [<var>file</var>] ...</code></td></tr>
290 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
291 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
292 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
293 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
295 <p>This sets the description to display for a file, for
296 <code><a href="#indexoptions.fancyindexing">FancyIndexing</a></code>.
297 <var>File</var> is a file extension, partial filename, wild-card
298 expression or full filename for files to describe.
299 <var>String</var> is enclosed in double quotes (<code>"</code>).</p>
301 <pre class="prettyprint lang-config">AddDescription "The planet Mars" mars.gif
302 AddDescription "My friend Marshall" friends/mars.gif</pre>
305 <p>The typical, default description field is 23 bytes wide. 6
306 more bytes are added by the <code><a href="#indexoptions.suppressicon">IndexOptions SuppressIcon</a></code> option, 7 bytes are
307 added by the <code><a href="#indexoptions.suppresssize">IndexOptions SuppressSize</a></code> option, and 19 bytes are
308 added by the <code><a href="#indexoptions.suppresslastmodified">IndexOptions SuppressLastModified</a></code> option.
309 Therefore, the widest default the description column is ever
310 assigned is 55 bytes.</p>
312 <p>Since the <var>File</var> argument may be a partial file name,
313 please remember that a too-short partial filename may match
314 unintended files. For example, <code>le.html</code> will match the
315 file <code>le.html</code> but will also match the file
316 <code>example.html</code>. In the event that there may be ambiguity,
317 use as complete a filename as you can, but keep in mind that the
318 first match encountered will be used, and order your list of
319 <code>AddDescription</code> directives accordingly.</p>
321 <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
322 of this column, or allowing descriptions of unlimited length.</p>
324 <div class="note"><h3>Caution</h3>
325 <p>Descriptive text defined with <code class="directive">AddDescription</code>
326 may contain HTML markup, such as tags and character entities. If the
327 width of the description column should happen to truncate a tagged
328 element (such as cutting off the end of a bolded phrase), the
329 results may affect the rest of the directory listing.</p>
332 <div class="note"><h3>Arguments with path information</h3>
333 <p>Absolute paths are not currently supported and do not match
334 anything at runtime. Arguments with relative path information,
335 which would normally only be used in htaccess context, are implicitly
336 prefixed with '*/' to avoid matching partial directory names.</p>
341 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
342 <div class="directive-section"><h2><a name="AddIcon" id="AddIcon">AddIcon</a> <a name="addicon" id="addicon">Directive</a></h2>
343 <table class="directive">
344 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Icon to display for a file selected by name</td></tr>
345 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AddIcon <var>icon</var> <var>name</var> [<var>name</var>]
347 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
348 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
349 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
350 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
352 <p>This sets the icon to display next to a file ending in
353 <var>name</var> for <code><a href="#indexoptions.fancyindexing">FancyIndexing</a></code>. <var>Icon</var> is either a (%-escaped)
354 relative URL to the icon, a fully qualified remote URL, or of the format <code>
355 (<var>alttext</var>,<var>url</var>)</code> where <var>alttext</var>
356 is the text tag given for an icon for non-graphical browsers.</p>
358 <p><var>Name</var> is either <code>^^DIRECTORY^^</code> for directories,
359 <code>^^BLANKICON^^</code> for blank lines (to format the list
360 correctly), a file extension, a wildcard expression, a partial
361 filename or a complete filename.</p>
363 <p><code>^^BLANKICON^^</code> is only used for formatting, and so
364 is unnecessary if you're using <code>IndexOptions
365 HTMLTable</code>.</p>
367 <pre class="prettyprint lang-config">#Examples
368 AddIcon (IMG,/icons/image.png) .gif .jpg .png
369 AddIcon /icons/dir.png ^^DIRECTORY^^
370 AddIcon /icons/backup.png *~</pre>
373 <p><code class="directive"><a href="#addiconbytype">AddIconByType</a></code>
374 should be used in preference to <code class="directive">AddIcon</code>,
378 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
379 <div class="directive-section"><h2><a name="AddIconByEncoding" id="AddIconByEncoding">AddIconByEncoding</a> <a name="addiconbyencoding" id="addiconbyencoding">Directive</a></h2>
380 <table class="directive">
381 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Icon to display next to files selected by MIME
382 content-encoding</td></tr>
383 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AddIconByEncoding <var>icon</var> <var>MIME-encoding</var>
384 [<var>MIME-encoding</var>] ...</code></td></tr>
385 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
386 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
387 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
388 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
390 <p>This sets the icon to display next to files with <code><a href="#indexoptions.fancyindexing">FancyIndexing</a></code>.
391 <var>Icon</var> is either a (%-escaped) relative URL to the icon,
392 a fully qualified remote URL,
393 or of the format <code>(<var>alttext</var>,<var>url</var>)</code>
394 where <var>alttext</var> is the text tag given for an icon for
395 non-graphical browsers.</p>
397 <p><var>MIME-encoding</var> is a valid content-encoding, such as
398 <code>x-compress</code>.</p>
400 <pre class="prettyprint lang-config">AddIconByEncoding /icons/compress.png x-compress</pre>
404 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
405 <div class="directive-section"><h2><a name="AddIconByType" id="AddIconByType">AddIconByType</a> <a name="addiconbytype" id="addiconbytype">Directive</a></h2>
406 <table class="directive">
407 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Icon to display next to files selected by MIME
408 content-type</td></tr>
409 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AddIconByType <var>icon</var> <var>MIME-type</var>
410 [<var>MIME-type</var>] ...</code></td></tr>
411 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
412 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
413 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
414 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
416 <p>This sets the icon to display next to files of type
417 <var>MIME-type</var> for <code><a href="#indexoptions.fancyindexing">FancyIndexing</a></code>.
418 <var>Icon</var> is either a (%-escaped) relative URL to the icon,
419 a fully qualified remote URL,
420 or of the format <code>(<var>alttext</var>,<var>url</var>)</code>
421 where <var>alttext</var> is the text tag given for an icon for
422 non-graphical browsers.</p>
424 <p><var>MIME-type</var> is a wildcard expression matching
425 required the mime types.</p>
427 <pre class="prettyprint lang-config">AddIconByType (IMG,/icons/image.png) image/*</pre>
431 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
432 <div class="directive-section"><h2><a name="DefaultIcon" id="DefaultIcon">DefaultIcon</a> <a name="defaulticon" id="defaulticon">Directive</a></h2>
433 <table class="directive">
434 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Icon to display for files when no specific icon is
436 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DefaultIcon <var>url-path</var></code></td></tr>
437 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
438 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
439 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
440 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
442 <p>The <code class="directive">DefaultIcon</code> directive sets the icon
443 to display for files when no specific icon is known, for <code><a href="#indexoptions.fancyindexing">FancyIndexing</a></code>.
444 <var>Url-path</var> is a (%-escaped) relative URL to the icon,
445 or a fully qualified remote URL.</p>
447 <pre class="prettyprint lang-config">DefaultIcon /icon/unknown.png</pre>
451 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
452 <div class="directive-section"><h2><a name="HeaderName" id="HeaderName">HeaderName</a> <a name="headername" id="headername">Directive</a></h2>
453 <table class="directive">
454 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Name of the file that will be inserted at the top
455 of the index listing</td></tr>
456 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>HeaderName <var>filename</var></code></td></tr>
457 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
458 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
459 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
460 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
462 <p>The <code class="directive">HeaderName</code> directive sets the name
463 of the file that will be inserted at the top of the index
464 listing. <var>Filename</var> is the name of the file to include.</p>
466 <pre class="prettyprint lang-config">HeaderName HEADER.html</pre>
470 <p>Both HeaderName and <code class="directive"><a href="#readmename">ReadmeName</a></code> now treat
471 <var>Filename</var> as a URI path relative to the one used to
472 access the directory being indexed. If <var>Filename</var> begins
473 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>
475 <pre class="prettyprint lang-config">HeaderName /include/HEADER.html</pre>
478 <p><var>Filename</var> must resolve to a document with a major
479 content type of <code>text/*</code> (<em>e.g.</em>,
480 <code>text/html</code>, <code>text/plain</code>, etc.). This means
481 that <var>filename</var> may refer to a CGI script if the script's
482 actual file type (as opposed to its output) is marked as
483 <code>text/html</code> such as with a directive like:</p>
485 <pre class="prettyprint lang-config">AddType text/html .cgi</pre>
488 <p><a href="../content-negotiation.html">Content negotiation</a>
489 will be performed if <code class="directive"><a href="../mod/core.html#options">Options</a></code>
490 <code>MultiViews</code> is in effect. If <var>filename</var> resolves
491 to a static <code>text/html</code> document (not a CGI script) and
492 either one of the <code class="directive"><a href="../mod/core.html#options">options</a></code>
493 <code>Includes</code> or <code>IncludesNOEXEC</code> is enabled,
494 the file will be processed for server-side includes (see the
495 <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> documentation).</p>
498 <p>If the file specified by <code class="directive">HeaderName</code> contains
499 the beginnings of an HTML document (<html>, <head>, etc.)
500 then you will probably want to set <a href="#indexoptions.suppresshtmlpreamble"><code>IndexOptions
501 +SuppressHTMLPreamble</code></a>, so that these tags are not
506 <li><code class="directive"><a href="#readmename">ReadmeName</a></code></li>
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="IndexHeadInsert" id="IndexHeadInsert">IndexHeadInsert</a> <a name="indexheadinsert" id="indexheadinsert">Directive</a></h2>
511 <table class="directive">
512 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Inserts text in the HEAD section of an index page.</td></tr>
513 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>IndexHeadInsert <var>"markup ..."</var></code></td></tr>
514 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
515 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
516 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
517 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
519 <p>The <code class="directive">IndexHeadInsert</code> directive specifies a
520 string to insert in the <var><head></var> section of the HTML
521 generated for the index page.</p>
522 <pre class="prettyprint lang-config">IndexHeadInsert "<link rel=\"sitemap\" href=\"/sitemap.html\">"</pre>
526 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
527 <div class="directive-section"><h2><a name="IndexIgnore" id="IndexIgnore">IndexIgnore</a> <a name="indexignore" id="indexignore">Directive</a></h2>
528 <table class="directive">
529 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Adds to the list of files to hide when listing
530 a directory</td></tr>
531 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>IndexIgnore <var>file</var> [<var>file</var>] ...</code></td></tr>
532 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>IndexIgnore "."</code></td></tr>
533 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
534 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
535 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
536 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
538 <p>The <code class="directive">IndexIgnore</code> directive adds to the
539 list of files to hide when listing a directory. <var>File</var> is a
540 shell-style wildcard expression or full
541 filename. Multiple IndexIgnore directives add
542 to the list, rather than replacing the list of ignored
543 files. By default, the list contains <code>.</code> (the current
546 <pre class="prettyprint lang-config">IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t</pre>
549 <div class="note"><h3>Regular Expressions</h3>
550 <p>This directive does not currently work in configuration sections
551 that have regular expression arguments, such as <code class="directive"><a href="../mod/core.html#directorymatch"><DirectoryMatch></a></code>
556 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
557 <div class="directive-section"><h2><a name="IndexIgnoreReset" id="IndexIgnoreReset">IndexIgnoreReset</a> <a name="indexignorereset" id="indexignorereset">Directive</a></h2>
558 <table class="directive">
559 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Empties the list of files to hide when listing
560 a directory</td></tr>
561 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>IndexIgnoreReset ON|OFF</code></td></tr>
562 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
563 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
564 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
565 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
566 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>2.3.10 and later</td></tr>
568 <p>The <code class="directive">IndexIgnoreReset</code> directive removes
569 any files ignored by <code class="directive">IndexIgnore</code> otherwise
570 inherited from other configuration sections. </p>
572 <pre class="prettyprint lang-config"><Directory "/var/www">
573 IndexIgnore *.bak .??* *~ *# HEADER* README* RCS CVS *,v *,t
575 <Directory "/var/www/backups">
577 IndexIgnore .??* *# HEADER* README* RCS CVS *,v *,t
578 </Directory></pre>
581 <div class="warning"><p> Review the default configuration for a list of
582 patterns that you might want to explicitly ignore after using this
586 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
587 <div class="directive-section"><h2><a name="IndexOptions" id="IndexOptions">IndexOptions</a> <a name="indexoptions" id="indexoptions">Directive</a></h2>
588 <table class="directive">
589 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Various configuration settings for directory
591 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>IndexOptions [+|-]<var>option</var> [[+|-]<var>option</var>]
593 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>By default, no options are enabled.</code></td></tr>
594 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
595 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
596 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
597 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
599 <p>The <code class="directive">IndexOptions</code> directive specifies the
600 behavior of the directory indexing. <var>Option</var> can be one
604 <dt><a name="indexoptions.addaltclass" id="indexoptions.addaltclass">AddAltClass</a></dt>
605 <dd>Adds an additional CSS class declaration to each row of the
606 directory listing table when <code>IndexOptions HTMLTable</code>
607 is in effect and an <code>IndexStyleSheet</code> is defined.
608 Rather than the standard <code>even</code> and <code>odd</code>
609 classes that would otherwise be applied to each row of the table,
610 a class of <code>even-<em>ALT</em></code> or
611 <code>odd-<em>ALT</em></code> where <em>ALT</em> is either the
612 standard alt text associated with the file style (eg. <em>snd</em>,
613 <em>txt</em>, <em>img</em>, etc) or the alt text defined by one of
614 the various <code>AddAlt*</code> directives.
617 <dt><a name="indexoptions.charset" id="indexoptions.charset">Charset=<var>character-set</var></a> (<em>Apache HTTP Server 2.0.61 and
620 <dd>The <code>Charset</code> keyword allows you to
621 specify the character set of the generated page. The
622 default is <code>UTF-8</code> on Windows and Mac OS X,
623 and <code>ISO-8859-1</code> elsewhere.
624 (It depends on whether the underlying file system
625 uses Unicode filenames or not.)
627 <pre class="prettyprint lang-config">IndexOptions Charset=UTF-8</pre>
631 <dt><a name="indexoptions.descriptionwidth" id="indexoptions.descriptionwidth">DescriptionWidth=[<var>n</var> | *]</a></dt>
633 <dd>The <code>DescriptionWidth</code> keyword allows you to
634 specify the width of the description column in
637 <dt><code>-DescriptionWidth</code> (or unset) allows
638 <code class="module"><a href="../mod/mod_autoindex.html">mod_autoindex</a></code> to calculate the best width.</dt>
640 <dd><code>DescriptionWidth=<var>n</var></code> fixes the column width to
641 <var>n</var> bytes wide.</dd>
643 <dd><code>DescriptionWidth=*</code> grows the column to the
644 width necessary to accommodate the longest description
647 <strong>See the section on <code class="directive"><a href="#adddescription">AddDescription</a></code> for dangers
648 inherent in truncating descriptions.</strong></dd>
650 <dt><a name="indexoptions.fancyindexing" id="indexoptions.fancyindexing">FancyIndexing</a></dt>
652 <dd>This turns on fancy indexing of directories.</dd>
654 <dt><a name="indexoptions.foldersfirst" id="indexoptions.foldersfirst">FoldersFirst</a></dt>
656 <dd>If this option is enabled, subdirectory listings will
657 <em>always</em> appear first, followed by normal files in the
658 directory. The listing is basically broken into two
659 components, the files and the subdirectories, and each is
660 sorted separately and then displayed subdirectories-first.
661 For instance, if the sort order is descending by name, and
662 <code>FoldersFirst</code> is enabled, subdirectory
663 <code>Zed</code> will be listed before subdirectory
664 <code>Beta</code>, which will be listed before normal files
665 <code>Gamma</code> and <code>Alpha</code>.
666 <strong>This option only has an effect if <a href="#indexoptions.fancyindexing"><code>FancyIndexing</code></a>
667 is also enabled.</strong>
670 <dt><a name="indexoptions.htmltable" id="indexoptions.htmltable">HTMLTable</a></dt>
672 <dd>This option with <code>FancyIndexing</code> constructs
673 a simple table for the fancy directory listing.
674 It is necessary for utf-8 enabled platforms or if file
675 names or description text will alternate between
676 left-to-right and right-to-left reading order.</dd>
678 <dt><a name="indexoptions.iconsarelinks" id="indexoptions.iconsarelinks">IconsAreLinks</a></dt>
680 <dd>This makes the icons part of the anchor for the filename, for
683 <dt><a name="indexoptions.iconheight" id="indexoptions.iconheight">IconHeight[=<var>pixels</var>]</a></dt>
685 <dd>Presence of this option, when used with <code>IconWidth</code>,
686 will cause the server to include <code>height</code> and
687 <code>width</code> attributes in the <code>img</code> tag for the file
688 icon. This allows browser to precalculate the page layout without having
689 to wait until all the images have been loaded. If no value is given for
690 the option, it defaults to the standard height of the icons supplied
691 with the Apache httpd software.
694 only has an effect if <a href="#indexoptions.fancyindexing"><code>FancyIndexing</code></a> is also enabled.</strong>
698 <dt><a name="indexoptions.iconwidth" id="indexoptions.iconwidth">IconWidth[=<var>pixels</var>]</a></dt>
700 <dd>Presence of this option, when used with <code>IconHeight</code>,
701 will cause the server to include <code>height</code> and
702 <code>width</code> attributes in the <code>img</code> tag for
703 the file icon. This allows browser to precalculate the page
704 layout without having to wait until all the images have been
705 loaded. If no value is given for the option, it defaults to
706 the standard width of the icons supplied with the Apache httpd
709 <dt><a name="indexoptions.ignorecase" id="indexoptions.ignorecase">IgnoreCase</a></dt>
711 <dd>If this option is enabled, names are sorted in a case-insensitive
712 manner. For instance, if the sort order is ascending by name, and
713 <code>IgnoreCase</code> is enabled, file Zeta will be listed after
714 file alfa (Note: file GAMMA will always be listed before file gamma).
717 <dt><a name="indexoptions.ignoreclient" id="indexoptions.ignoreclient">IgnoreClient</a></dt>
719 <dd>This option causes <code class="module"><a href="../mod/mod_autoindex.html">mod_autoindex</a></code> to ignore all
720 query variables from the client, including sort order (implies
721 <code><a href="#indexoptions.suppresscolumnsorting">SuppressColumnSorting</a></code>.)</dd>
723 <dt><a name="indexoptions.namewidth" id="indexoptions.namewidth">NameWidth=[<var>n</var>
726 <dd>The <code>NameWidth</code> keyword allows you to specify the width
727 of the filename column in bytes.</dd>
729 <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
730 to 20 bytes wide.</dd>
732 <dd><code>NameWidth=<var>n</var></code> fixes the column width to
733 <var>n</var> bytes wide.</dd>
735 <dd><code>NameWidth=*</code> grows the column to the necessary
738 <dt><a name="indexoptions.scanhtmltitles" id="indexoptions.scanhtmltitles">ScanHTMLTitles</a></dt>
740 <dd>This enables the extraction of the title from HTML documents
741 for fancy indexing. If the file does not have a description
742 given by <code class="directive"><a href="#adddescription">AddDescription</a></code>
743 then httpd will read the document for the value of the
744 <code>title</code> element. This is CPU and disk intensive.</dd>
746 <dt><a name="indexoptions.showforbidden" id="indexoptions.showforbidden">ShowForbidden</a></dt>
748 <dd>If specified, Apache httpd will show files normally hidden because
749 the subrequest returned <code>HTTP_UNAUTHORIZED</code> or
750 <code>HTTP_FORBIDDEN</code></dd>
752 <dt><a name="indexoptions.suppresscolumnsorting" id="indexoptions.suppresscolumnsorting">SuppressColumnSorting</a></dt>
754 <dd>If specified, Apache httpd will not make the column headings in a
755 FancyIndexed directory listing into links for sorting. The
756 default behavior is for them to be links; selecting the
757 column heading will sort the directory listing by the values
758 in that column. However, query string arguments which are appended
759 to the URL will still be honored. That behavior is controlled by <a href="#indexoptions.ignoreclient"><code>IndexOptions
760 IgnoreClient</code></a>.</dd>
762 <dt><a name="indexoptions.suppressdescription" id="indexoptions.suppressdescription">SuppressDescription</a></dt>
764 <dd>This will suppress the file description in fancy indexing
765 listings. By default, no file descriptions are defined, and
766 so the use of this option will regain 23 characters of screen
767 space to use for something else. See <code class="directive"><a href="#adddescription">AddDescription</a></code> for information about setting the file
768 description. See also the <code><a href="#indexoptions.descriptionwidth">DescriptionWidth</a></code>
769 index option to limit the size of the description column.
772 only has an effect if <a href="#indexoptions.fancyindexing"><code>FancyIndexing</code></a> is also enabled.</strong>
775 <dt><a name="indexoptions.suppresshtmlpreamble" id="indexoptions.suppresshtmlpreamble">SuppressHTMLPreamble</a></dt>
777 <dd>If the directory actually contains a file specified by the
778 <code class="directive"><a href="#headername">HeaderName</a></code>
779 directive, the module usually includes the contents of the file
780 after a standard HTML preamble (<code><html></code>,
781 <code><head></code>, <em>et cetera</em>). The
782 <code>SuppressHTMLPreamble</code> option disables this behaviour,
783 causing the module to start the display with the header file
784 contents. The header file must contain appropriate HTML instructions
785 in this case. If there is no header file, the preamble is generated
786 as usual. If you also specify a <code class="directive"><a href="#readmename">ReadmeName</a></code>, and if that file
787 exists, The closing </body></html> tags are also
788 ommitted from the output, under the assumption that you'll likely
789 put those closing tags in that file.</dd>
791 <dt><a name="indexoptions.suppressicon" id="indexoptions.suppressicon">SuppressIcon</a></dt>
793 <dd>This will suppress the icon in fancy indexing listings.
794 Combining both <code>SuppressIcon</code> and
795 <code>SuppressRules</code> yields proper HTML 3.2 output, which
796 by the final specification prohibits <code>img</code> and
797 <code>hr</code> elements from the <code>pre</code> block (used to
798 format FancyIndexed listings.)</dd>
800 <dt><a name="indexoptions.suppresslastmodified" id="indexoptions.suppresslastmodified">SuppressLastModified</a></dt>
802 <dd>This will suppress the display of the last modification date,
803 in fancy indexing listings.
806 only has an effect if <a href="#indexoptions.fancyindexing"><code>FancyIndexing</code></a> is also enabled.</strong>
809 <dt><a name="indexoptions.suppressrules" id="indexoptions.suppressrules">SuppressRules</a>
812 <dd>This will suppress the horizontal rule lines (<code>hr</code>
813 elements) in directory listings. Combining both <code>SuppressIcon</code> and
814 <code>SuppressRules</code> yields proper HTML 3.2 output, which
815 by the final specification prohibits <code>img</code> and
816 <code>hr</code> elements from the <code>pre</code> block (used to
817 format FancyIndexed listings.)
820 only has an effect if <a href="#indexoptions.fancyindexing"><code>FancyIndexing</code></a> is also enabled.</strong>
824 <dt><a name="indexoptions.suppresssize" id="indexoptions.suppresssize">SuppressSize</a></dt>
826 <dd>This will suppress the file size in fancy indexing listings.
829 only has an effect if <a href="#indexoptions.fancyindexing"><code>FancyIndexing</code></a> is also enabled.</strong>
832 <dt><a name="indexoptions.trackmodified" id="indexoptions.trackmodified">TrackModified</a></dt>
834 <dd>This returns the <code>Last-Modified</code> and <code>ETag</code>
835 values for the listed directory in the HTTP header. It is only valid
836 if the operating system and file system return appropriate stat()
837 results. Some Unix systems do so, as do OS2's JFS and Win32's
838 NTFS volumes. OS2 and Win32 FAT volumes, for example, do not.
839 Once this feature is enabled, the client or proxy can track
840 changes to the list of files when they perform a <code>HEAD</code>
841 request. Note some operating systems correctly track new and
842 removed files, but do not track changes for sizes or dates of
843 the files within the directory. <strong>Changes to the size
844 or date stamp of an existing file will not update the
845 <code>Last-Modified</code> header on all Unix platforms.</strong>
846 If this is a concern, leave this option disabled.</dd>
848 <dt><a name="indexoptions.type" id="indexoptions.type">Type=<var>MIME content-type</var></a> (<em>Apache HTTP Server 2.0.61 and
851 <dd>The <code>Type</code> keyword allows you to
852 specify the MIME content-type of the generated page. The default
853 is <var>text/html</var>.
855 <pre class="prettyprint lang-config">IndexOptions Type=text/plain</pre>
859 <dt><a name="indexoptions.versionsort" id="indexoptions.versionsort">VersionSort</a>
860 (<em>Apache HTTP Server 2.0a3 and later</em>)</dt>
862 <dd>The <code>VersionSort</code> keyword causes files containing
863 version numbers to sort in a natural way. Strings are sorted as
864 usual, except that substrings of digits in the name and
865 description are compared according to their numeric value.
867 <div class="example"><h3>Example:</h3><p><code>
876 <p>If the number starts with a zero, then it is considered to
879 <div class="example"><p><code>
887 <dt><a name="indexoptions.xhtml" id="indexoptions.xhtml">XHTML</a>
888 (<em>Apache HTTP Server 2.0.49 and later</em>)</dt>
890 <dd>The <code>XHTML</code> keyword forces <code class="module"><a href="../mod/mod_autoindex.html">mod_autoindex</a></code>
891 to emit XHTML 1.0 code instead of HTML 3.2.
893 only has an effect if <a href="#indexoptions.fancyindexing"><code>FancyIndexing</code></a> is also enabled.</strong>
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"><Directory "/foo">
910 IndexOptions HTMLTable
911 IndexOptions SuppressColumnsorting
912 </Directory></pre>
915 <p>will be the equivalent of</p>
917 <pre class="prettyprint lang-config">IndexOptions HTMLTable SuppressColumnsorting</pre>
921 <li>The addition of the incremental syntax (<em>i.e.</em>, prefixing
922 keywords with <code>+</code> or <code>-</code>).</li>
925 <p>Whenever a '+' or '-' prefixed keyword is encountered, it
926 is applied to the current <code class="directive">IndexOptions</code>
927 settings (which may have been inherited from an upper-level
928 directory). However, whenever an unprefixed keyword is processed, it
929 clears all inherited options and any incremental settings encountered
930 so far. Consider the following example:</p>
932 <pre class="prettyprint lang-config">IndexOptions +ScanHTMLTitles -IconsAreLinks FancyIndexing
933 IndexOptions +SuppressSize</pre>
936 <p>The net effect is equivalent to <code>IndexOptions FancyIndexing
937 +SuppressSize</code>, because the unprefixed <code>FancyIndexing</code>
938 discarded the incremental keywords before it, but allowed them to
939 start accumulating again afterward.</p>
941 <p>To unconditionally set the <code class="directive">IndexOptions</code> for
942 a particular directory, clearing the inherited settings, specify
943 keywords without any <code>+</code> or <code>-</code> prefixes.</p>
948 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
949 <div class="directive-section"><h2><a name="IndexOrderDefault" id="IndexOrderDefault">IndexOrderDefault</a> <a name="indexorderdefault" id="indexorderdefault">Directive</a></h2>
950 <table class="directive">
951 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Sets the default ordering of the directory index</td></tr>
952 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>IndexOrderDefault Ascending|Descending
953 Name|Date|Size|Description</code></td></tr>
954 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>IndexOrderDefault Ascending Name</code></td></tr>
955 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
956 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
957 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
958 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
960 <p>The <code class="directive">IndexOrderDefault</code> directive is used
961 in combination with the <code><a href="#indexoptions.fancyindexing">FancyIndexing</a></code> index option. By default, fancyindexed
962 directory listings are displayed in ascending order by filename; the
963 <code class="directive">IndexOrderDefault</code> allows you to change this
964 initial display order.</p>
966 <p><code class="directive">IndexOrderDefault</code> takes two
967 arguments. The first must be either <code>Ascending</code> or
968 <code>Descending</code>, indicating the direction of the sort.
969 The second argument must be one of the keywords <code>Name</code>,
970 <code>Date</code>, <code>Size</code>, or <code>Description</code>,
971 and identifies the primary key. The secondary key is
972 <em>always</em> the ascending filename.</p>
974 <p>You can, if desired, prevent the client from reordering the list
975 by also adding the <code><a href="#indexoptions.suppresscolumnsorting">SuppressColumnSorting</a></code>
976 index option to remove the sort link from the top of the column,
977 along with the <code><a href="#indexoptions.ignoreclient">IgnoreClient</a></code> index
978 option to prevent them from manually adding sort options to the
979 query string in order to override your ordering preferences.</p>
982 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
983 <div class="directive-section"><h2><a name="IndexStyleSheet" id="IndexStyleSheet">IndexStyleSheet</a> <a name="indexstylesheet" id="indexstylesheet">Directive</a></h2>
984 <table class="directive">
985 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Adds a CSS stylesheet to the directory index</td></tr>
986 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>IndexStyleSheet <var>url-path</var></code></td></tr>
987 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
988 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
989 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
990 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
992 <p>The <code class="directive">IndexStyleSheet</code> directive sets the name of
993 the file that will be used as the CSS for the index listing.
995 <pre class="prettyprint lang-config">IndexStyleSheet "/css/style.css"</pre>
998 <p>Using this directive in conjunction with <code>IndexOptions
999 HTMLTable</code> adds a number of CSS classes to the resulting HTML.
1000 The entire table is given a CSS id of <code>indexlist</code> and the
1001 following classes are associated with the various parts of the
1004 <table class="bordered"><tr class="header"><th>Class</th><th>Definition</th></tr>
1005 <tr><td>tr.indexhead</td><td>Header row of listing</td></tr>
1006 <tr class="odd"><td>th.indexcolicon and td.indexcolicon</td> <td>Icon column</td></tr>
1007 <tr><td>th.indexcolname and td.indexcolname</td> <td>File name column</td></tr>
1008 <tr class="odd"><td>th.indexcollastmod and td.indexcollastmod</td> <td>Last modified column</td></tr>
1009 <tr><td>th.indexcolsize and td.indexcolsize</td> <td>File size column</td></tr>
1010 <tr class="odd"><td>th.indexcoldesc and td.indexcoldesc</td> <td>Description column</td></tr>
1011 <tr><td>tr.breakrow</td> <td>Horizontal rule at the bottom of the table</td></tr>
1012 <tr class="odd"><td>tr.odd and tr.even</td> <td>Alternating even and odd rows</td></tr>
1017 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1018 <div class="directive-section"><h2><a name="ReadmeName" id="ReadmeName">ReadmeName</a> <a name="readmename" id="readmename">Directive</a></h2>
1019 <table class="directive">
1020 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Name of the file that will be inserted at the end
1021 of the index listing</td></tr>
1022 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ReadmeName <var>filename</var></code></td></tr>
1023 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1024 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
1025 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
1026 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
1028 <p>The <code class="directive">ReadmeName</code> directive sets the name
1029 of the file that will be appended to the end of the index
1030 listing. <var>Filename</var> is the name of the file to include, and
1031 is taken to be relative to the location being indexed. If
1032 <var>Filename</var> begins with a slash, as in example 2, it will be taken to be
1033 relative to the <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code>.
1036 <pre class="prettyprint lang-config"># Example 1
1037 ReadmeName FOOTER.html</pre>
1040 <pre class="prettyprint lang-config"># Example 2
1041 ReadmeName /include/FOOTER.html</pre>
1044 <p>See also <code class="directive"><a href="#headername">HeaderName</a></code>, where this behavior is described in greater
1049 <div class="bottomlang">
1050 <p><span>Available Languages: </span><a href="../en/mod/mod_autoindex.html" title="English"> en </a> |
1051 <a href="../fr/mod/mod_autoindex.html" hreflang="fr" rel="alternate" title="Français"> fr </a> |
1052 <a href="../ja/mod/mod_autoindex.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
1053 <a href="../ko/mod/mod_autoindex.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> |
1054 <a href="../tr/mod/mod_autoindex.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p>
1055 </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>
1056 <script type="text/javascript"><!--//--><![CDATA[//><!--
1057 var comments_shortname = 'httpd';
1058 var comments_identifier = 'http://httpd.apache.org/docs/trunk/mod/mod_autoindex.html';
1060 if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
1061 d.write('<div id="comments_thread"><\/div>');
1062 var s = d.createElement('script');
1063 s.type = 'text/javascript';
1065 s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
1066 (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
1069 d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
1071 })(window, document);
1072 //--><!]]></script></div><div id="footer">
1073 <p class="apache">Copyright 2016 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>
1074 <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[//><!--
1075 if (typeof(prettyPrint) !== 'undefined') {