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