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