2 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
3 <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
4 <!-- $Revision: 1.25 $ -->
7 Copyright 2002-2004 The Apache Software Foundation
9 Licensed under the Apache License, Version 2.0 (the "License");
10 you may not use this file except in compliance with the License.
11 You may obtain a copy of the License at
13 http://www.apache.org/licenses/LICENSE-2.0
15 Unless required by applicable law or agreed to in writing, software
16 distributed under the License is distributed on an "AS IS" BASIS,
17 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 See the License for the specific language governing permissions and
19 limitations under the License.
22 <modulesynopsis metafile="mod_autoindex.xml.meta">
23 <name>mod_autoindex</name>
25 <description>Generates directory indexes,
26 automatically, similar to the Unix <code>ls</code> command or the
27 Win32 <code>dir</code> shell command</description>
29 <sourcefile>mod_autoindex.c</sourcefile>
30 <identifier>autoindex_module</identifier>
33 <p>The index of a directory can come from one of two
37 <li>A file written by the user, typically called
38 <code>index.html</code>. The <directive
39 module="mod_dir">DirectoryIndex</directive> directive sets the
40 name of this file. This is controlled by
41 <module>mod_dir</module>.</li>
43 <li>Otherwise, a listing generated by the server. The other
44 directives control the format of this listing. The <directive
45 module="mod_autoindex">AddIcon</directive>, <directive
46 module="mod_autoindex">AddIconByEncoding</directive> and
47 <directive module="mod_autoindex">AddIconByType</directive> are
48 used to set a list of icons to display for various file types;
49 for each file listed, the first icon listed that matches the
50 file is displayed. These are controlled by
51 <module>mod_autoindex</module>.</li>
53 <p>The two functions are separated so that you can completely
54 remove (or replace) automatic index generation should you want
57 <p>Automatic index generation is enabled with using
58 <code>Options +Indexes</code>. See the
59 <directive module="core">Options</directive> directive for
62 <p>If the <code><a href="#indexoptions.fancyindexing"
63 >FancyIndexing</a></code> option is given with the <directive
64 module="mod_autoindex">IndexOptions</directive> 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
70 <directive module="mod_autoindex">IndexOptions</directive> 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>
81 <title>Autoindex Request Query Arguments</title>
83 <p>Apache 2.0.23 reorganized the Query Arguments for Column
84 Sorting, and introduced an entire group of new query options.
85 To effectively eliminate all client control over the output,
86 the <code><a href="#indexoptions.ignoreclient">IndexOptions
87 IgnoreClient</a></code> option was introduced.</p>
89 <p>The column sorting headers themselves are self-referencing
90 hyperlinks that add the sort query options shown below. Any
91 option below may be added to any request for the directory
95 <li><code>C=N</code> sorts the directory by file name</li>
97 <li><code>C=M</code> sorts the directory by last-modified
98 date, then file name</li>
100 <li><code>C=S</code> sorts the directory by size, then file
103 <li class="separate"><code>C=D</code> sorts the directory by description, then
106 <li><code>O=A</code> sorts the listing in Ascending
109 <li class="separate"><code>O=D</code> sorts the listing in Descending
112 <li><code>F=0</code> formats the listing as a simple list
113 (not FancyIndexed)</li>
115 <li><code>F=1</code> formats the listing as a FancyIndexed
118 <li class="separate"><code>F=2</code> formats the listing as an
119 HTMLTable FancyIndexed list</li>
121 <li><code>V=0</code> disables version sorting</li>
123 <li class="separate"><code>V=1</code> enables version sorting</li>
125 <li><code>P=<var>pattern</var></code> lists only files matching
126 the given <var>pattern</var></li>
129 <p>Note that the 'P'attern query argument is tested
130 <em>after</em> the usual <directive module="mod_autoindex"
131 >IndexIgnore</directive> directives are processed,
132 and all file names are still subjected to the same criteria as
133 any other autoindex listing. The Query Arguments parser in
134 <module>mod_autoindex</module> will stop abruptly when an unrecognized
135 option is encountered. The Query Arguments must be well formed,
136 according to the table above.</p>
138 <p>The simple example below, which can be clipped and saved in
139 a header.html file, illustrates these query options. Note that
140 the unknown "X" argument, for the submit button, is listed last
141 to assure the arguments are all parsed before mod_autoindex
142 encounters the X=Go input.</p>
145 <form action="" method="get"><br />
147 Show me a <select name="F"><br />
149 <option value="0"> Plain list</option><br />
150 <option value="1" selected="selected"> Fancy list</option><br />
151 <option value="2"> Table list</option><br />
153 </select><br />
154 Sorted by <select name="C"><br />
156 <option value="N" selected="selected"> Name</option><br />
157 <option value="M"> Date Modified</option><br />
158 <option value="S"> Size</option><br />
159 <option value="D"> Description</option><br />
161 </select><br />
162 <select name="O"><br />
164 <option value="A" selected="selected"> Ascending</option><br />
165 <option value="D"> Descending</option><br />
167 </select><br />
168 <select name="V"><br />
170 <option value="0" selected="selected"> in Normal order</option><br />
171 <option value="1"> in Version order</option><br />
173 </select><br />
174 Matching <input type="text" name="P" value="*" /><br />
175 <input type="submit" name="X" value="Go" /><br />
184 <description>Alternate text to display for a file, instead of an
185 icon selected by filename</description>
186 <syntax>AddAlt <var>string</var> <var>file</var> [<var>file</var>] ...</syntax>
187 <contextlist><context>server config</context><context>virtual host</context>
188 <context>directory</context><context>.htaccess</context>
190 <override>Indexes</override>
193 <p><directive>AddAlt</directive> provides the alternate text to
194 display for a file, instead of an icon, for <code><a
195 href="#indexoptions.fancyindexing">FancyIndexing</a></code>.
196 <var>File</var> is a file extension, partial filename, wild-card
197 expression or full filename for files to describe.
198 If <var>String</var> contains any whitespace, you have to enclose it
199 in quotes (<code>"</code> or <code>'</code>). This alternate text
200 is displayed if the client is image-incapable, has image loading
201 disabled, or fails to retrieve the icon.</p>
203 <example><title>Examples</title>
204 AddAlt "PDF file" *.pdf<br />
205 AddAlt Compressed *.gz *.zip *.Z
211 <name>AddAltByEncoding</name>
212 <description>Alternate text to display for a file instead of an icon
213 selected by MIME-encoding</description>
214 <syntax>AddAltByEncoding <var>string</var> <var>MIME-encoding</var>
215 [<var>MIME-encoding</var>] ...</syntax>
216 <contextlist><context>server config</context><context>virtual host</context>
217 <context>directory</context><context>.htaccess</context>
219 <override>Indexes</override>
222 <p><directive>AddAltByEncoding</directive> provides the alternate
223 text to display for a file, instead of an icon, for <code><a
224 href="#indexoptions.fancyindexing">FancyIndexing</a></code>.
225 <var>MIME-encoding</var> is a valid content-encoding, such as
226 <code>x-compress</code>. If <var>String</var> contains any whitespace,
227 you have to enclose it in quotes (<code>"</code> or <code>'</code>).
228 This alternate text is displayed if the client is image-incapable,
229 has image loading disabled, or fails to retrieve the icon.</p>
231 <example><title>Example</title>
232 AddAltByEncoding gzip x-gzip
238 <name>AddAltByType</name>
239 <description>Alternate text to display for a file, instead of an
240 icon selected by MIME content-type</description>
241 <syntax>AddAltByType <var>string</var> <var>MIME-type</var>
242 [<var>MIME-type</var>] ...</syntax>
243 <contextlist><context>server config</context><context>virtual host</context>
244 <context>directory</context><context>.htaccess</context>
246 <override>Indexes</override>
249 <p><directive>AddAltByType</directive> sets the alternate text to
250 display for a file, instead of an icon, for <code><a
251 href="#indexoptions.fancyindexing">FancyIndexing</a></code>.
252 <var>MIME-type</var> is a valid content-type, such as
253 <code>text/html</code>. If <var>String</var> contains any whitespace,
254 you have to enclose it in quotes (<code>"</code> or <code>'</code>).
255 This alternate text is displayed if the client is image-incapable,
256 has image loading disabled, or fails to retrieve the icon.</p>
258 <example><title>Example</title>
259 AddAltByType 'plain text' text/plain
265 <name>AddDescription</name>
266 <description>Description to display for a file</description>
267 <syntax>AddDescription <var>string file</var> [<var>file</var>] ...</syntax>
268 <contextlist><context>server config</context><context>virtual host</context>
269 <context>directory</context><context>.htaccess</context>
271 <override>Indexes</override>
274 <p>This sets the description to display for a file, for
275 <code><a href="#indexoptions.fancyindexing"
276 >FancyIndexing</a></code>.
277 <var>File</var> is a file extension, partial filename, wild-card
278 expression or full filename for files to describe.
279 <var>String</var> is enclosed in double quotes (<code>"</code>).</p>
281 <example><title>Example</title>
282 AddDescription "The planet Mars" /web/pics/mars.gif
285 <p>The typical, default description field is 23 bytes wide. 6
286 more bytes are added by the <code><a href="#indexoptions.suppressicon"
287 >IndexOptions SuppressIcon</a></code> option, 7 bytes are
288 added by the <code><a href="#indexoptions.suppresssize"
289 >IndexOptions SuppressSize</a></code> option, and 19 bytes are
290 added by the <code><a href="#indexoptions.suppresslastmodified"
291 >IndexOptions SuppressLastModified</a></code> option.
292 Therefore, the widest default the description column is ever
293 assigned is 55 bytes.</p>
295 <p>See the <a href="#indexoptions.descriptionwidth"
296 >DescriptionWidth</a> <directive module="mod_autoindex"
297 >IndexOptions</directive> keyword for details on overriding the size
298 of this column, or allowing descriptions of unlimited length.</p>
300 <note><title>Caution</title>
301 <p>Descriptive text defined with <directive>AddDescription</directive>
302 may contain HTML markup, such as tags and character entities. If the
303 width of the description column should happen to truncate a tagged
304 element (such as cutting off the end of a bolded phrase), the
305 results may affect the rest of the directory listing.</p>
312 <description>Icon to display for a file selected by name</description>
313 <syntax>AddIcon <var>icon</var> <var>name</var> [<var>name</var>]
315 <contextlist><context>server config</context><context>virtual host</context>
316 <context>directory</context><context>.htaccess</context>
318 <override>Indexes</override>
321 <p>This sets the icon to display next to a file ending in
322 <var>name</var> for <code><a href="#indexoptions.fancyindexing"
323 >FancyIndexing</a></code>. <var>Icon</var> is either a (%-escaped)
324 relative URL to the icon, or of the format <code>
325 (<var>alttext</var>,<var>url</var>)</code> where <var>alttext</var>
326 is the text tag given for an icon for non-graphical browsers.</p>
328 <p><var>Name</var> is either <code>^^DIRECTORY^^</code> for directories,
329 <code>^^BLANKICON^^</code> for blank lines (to format the list
330 correctly), a file extension, a wildcard expression, a partial
331 filename or a complete filename.</p>
333 <example><title>Examples</title>
334 AddIcon (IMG,/icons/image.xbm) .gif .jpg .xbm<br />
335 AddIcon /icons/dir.xbm ^^DIRECTORY^^<br />
336 AddIcon /icons/backup.xbm *~
339 <p><directive module="mod_autoindex">AddIconByType</directive>
340 should be used in preference to <directive>AddIcon</directive>,
346 <name>AddIconByEncoding</name>
347 <description>Icon to display next to files selected by MIME
348 content-encoding</description>
349 <syntax>AddIconByEncoding <var>icon</var> <var>MIME-encoding</var>
350 [<var>MIME-encoding</var>] ...</syntax>
351 <contextlist><context>server config</context><context>virtual host</context>
352 <context>directory</context><context>.htaccess</context>
354 <override>Indexes</override>
357 <p>This sets the icon to display next to files with <code><a
358 href="#indexoptions.fancyindexing">FancyIndexing</a></code>.
359 <var>Icon</var> is either a (%-escaped) relative URL to the icon,
360 or of the format <code>(<var>alttext</var>,<var>url</var>)</code>
361 where <var>alttext</var> is the text tag given for an icon for
362 non-graphical browsers.</p>
364 <p><var>MIME-encoding</var> is a wildcard expression matching
365 required the content-encoding.</p>
367 <example><title>Example</title>
368 AddIconByEncoding /icons/compress.xbm x-compress
374 <name>AddIconByType</name>
375 <description>Icon to display next to files selected by MIME
376 content-type</description>
377 <syntax>AddIconByType <var>icon</var> <var>MIME-type</var>
378 [<var>MIME-type</var>] ...</syntax>
379 <contextlist><context>server config</context><context>virtual host</context>
380 <context>directory</context><context>.htaccess</context>
382 <override>Indexes</override>
385 <p>This sets the icon to display next to files of type
386 <var>MIME-type</var> for <code><a
387 href="#indexoptions.fancyindexing">FancyIndexing</a></code>.
388 <var>Icon</var> is either a (%-escaped) relative URL to the icon,
389 or of the format <code>(<var>alttext</var>,<var>url</var>)</code>
390 where <var>alttext</var> is the text tag given for an icon for
391 non-graphical browsers.</p>
393 <p><var>MIME-type</var> is a wildcard expression matching
394 required the mime types.</p>
396 <example><title>Example</title>
397 AddIconByType (IMG,/icons/image.xbm) image/*
403 <name>DefaultIcon</name>
404 <description>Icon to display for files when no specific icon is
405 configured</description>
406 <syntax>DefaultIcon <var>url-path</var></syntax>
407 <contextlist><context>server config</context><context>virtual host</context>
408 <context>directory</context><context>.htaccess</context>
410 <override>Indexes</override>
413 <p>The <directive>DefaultIcon</directive> directive sets the icon
414 to display for files when no specific icon is known, for <code><a
415 href="#indexoptions.fancyindexing">FancyIndexing</a></code>.
416 <var>Url-path</var> is a (%-escaped) relative URL to the icon.</p>
418 <example><title>Example</title>
419 DefaultIcon /icon/unknown.xbm
425 <name>HeaderName</name>
426 <description>Name of the file that will be inserted at the top
427 of the index listing</description>
428 <syntax>HeaderName <var>filename</var></syntax>
429 <contextlist><context>server config</context><context>virtual host</context>
430 <context>directory</context><context>.htaccess</context>
432 <override>Indexes</override>
435 <p>The <directive>HeaderName</directive> directive sets the name
436 of the file that will be inserted at the top of the index
437 listing. <var>Filename</var> is the name of the file to include.</p>
439 <example><title>Example</title>
440 HeaderName HEADER.html
444 <p>Both HeaderName and <directive
445 module="mod_autoindex">ReadmeName</directive> now treat
446 <var>Filename</var> as a URI path relative to the one used to
447 access the directory being indexed. If <var>Filename</var> begins
448 with a slash, it will be taken to be relative to the <directive
449 module="core">DocumentRoot</directive>.</p>
451 <example><title>Example</title>
452 HeaderName /include/HEADER.html
455 <p><var>Filename</var> must resolve to a document with a major
456 content type of <code>text/*</code> (<em>e.g.</em>,
457 <code>text/html</code>, <code>text/plain</code>, etc.). This means
458 that <var>filename</var> may refer to a CGI script if the script's
459 actual file type (as opposed to its output) is marked as
460 <code>text/html</code> such as with a directive like:</p>
463 AddType text/html .cgi
466 <p><a href="../content-negotiation.html">Content negotiation</a>
467 will be performed if <directive module="core">Options</directive>
468 <code>MultiViews</code> is in effect. If <var>filename</var> resolves
469 to a static <code>text/html</code> document (not a CGI script) and
470 either one of the <directive module="core">options</directive>
471 <code>Includes</code> or <code>IncludesNOEXEC</code> is enabled,
472 the file will be processed for server-side includes (see the
473 <module>mod_include</module> documentation).</p>
476 <p>If the file specified by <directive>HeaderName</directive> contains
477 the beginnings of an HTML document (<html>, <head>, etc.)
478 then you will probably want to set <a
479 href="#indexoptions.suppresshtmlpreamble"><code>IndexOptions
480 +SuppressHTMLPreamble</code></a>, so that these tags are not
486 <name>IndexIgnore</name>
487 <description>Adds to the list of files to hide when listing
488 a directory</description>
489 <syntax>IndexIgnore <var>file</var> [<var>file</var>] ...</syntax>
490 <contextlist><context>server config</context><context>virtual host</context>
491 <context>directory</context><context>.htaccess</context>
493 <override>Indexes</override>
496 <p>The <directive>IndexIgnore</directive> directive adds to the
497 list of files to hide when listing a directory. <var>File</var> is a
498 shell-style wildcard expression or full
499 filename. Multiple IndexIgnore directives add
500 to the list, rather than the replacing the list of ignored
501 files. By default, the list contains <code>.</code> (the current
505 IndexIgnore README .htaccess *.bak *~
511 <name>IndexOptions</name>
512 <description>Various configuration settings for directory
513 indexing</description>
514 <syntax>IndexOptions [+|-]<var>option</var> [[+|-]<var>option</var>]
516 <contextlist><context>server config</context><context>virtual host</context>
517 <context>directory</context><context>.htaccess</context>
519 <override>Indexes</override>
522 <p>The <directive>IndexOptions</directive> directive specifies the
523 behavior of the directory indexing. <var>Option</var> can be one
527 <dt><a name="indexoptions.descriptionwidth"
528 id="indexoptions.descriptionwidth"
529 >DescriptionWidth=[<var>n</var> | *]</a> (<em>Apache 2.0.23 and
532 <dd>The <code>DescriptionWidth</code> keyword allows you to
533 specify the width of the description column in
536 <dd><code>-DescriptionWidth</code> (or unset) allows
537 <module>mod_autoindex</module> to calculate the best width.</dd>
539 <dd><code>DescriptionWidth=<var>n</var></code> fixes the column width to
540 <var>n</var> bytes wide.</dd>
542 <dd><code>DescriptionWidth=*</code> grows the column to the
543 width necessary to accommodate the longest description
546 <dd><strong>See the section on <directive
547 module="mod_autoindex">AddDescription</directive> for dangers
548 inherent in truncating descriptions.</strong></dd>
550 <dt><a name="indexoptions.fancyindexing"
551 id="indexoptions.fancyindexing">FancyIndexing</a></dt>
553 <dd>This turns on fancy indexing of directories.</dd>
555 <dt><a name="indexoptions.foldersfirst"
556 id="indexoptions.foldersfirst">FoldersFirst</a> (<em>Apache
557 2.0.23 and later</em>)</dt>
559 <dd>If this option is enabled, subdirectory listings will
560 <em>always</em> appear first, followed by normal files in the
561 directory. The listing is basically broken into two
562 components, the files and the subdirectories, and each is
563 sorted separately and then displayed subdirectories-first.
564 For instance, if the sort order is descending by name, and
565 <code>FoldersFirst</code> is enabled, subdirectory
566 <code>Zed</code> will be listed before subdirectory
567 <code>Beta</code>, which will be listed before normal files
568 <code>Gamma</code> and <code>Alpha</code>. <strong>This option
569 only has an effect if <a href="#indexoptions.fancyindexing"
570 ><code>FancyIndexing</code></a> is also enabled.</strong></dd>
572 <dt><a name="indexoptions.htmltable"
573 id="indexoptions.htmltable">HTMLTable</a> (<em>Experimental,
574 Apache 2.0.23 and later</em>)</dt>
576 <dd>This experimental option with FancyIndexing constructs a
577 simple table for the fancy directory listing. Note this will
578 confuse older browsers. It is particularly necessary if file
579 names or description text will alternate between
580 left-to-right and right-to-left reading order, as can happen
581 on WinNT or other utf-8 enabled platforms.</dd>
583 <dt><a name="indexoptions.iconsarelinks"
584 id="indexoptions.iconsarelinks">IconsAreLinks</a></dt>
586 <dd>This makes the icons part of the anchor for the filename, for
589 <dt><a name="indexoptions.iconheight"
590 id="indexoptions.iconheight">IconHeight[=<var
591 >pixels</var>]</a></dt>
593 <dd>Presence of this option, when used with IconWidth, will cause
594 the server to include <code>height</code> and <code>width</code>
595 attributes in the <code>img</code> tag for the file icon. This allows
596 browser to precalculate the page layout without having to wait until
597 all the images have been loaded. If no value is given for the option,
598 it defaults to the standard height of the icons supplied with the Apache
601 <dt><a name="indexoptions.iconwidth"
602 id="indexoptions.iconwidth">IconWidth[=<var
603 >pixels</var>]</a></dt>
605 <dd>Presence of this option, when used with <code>IconHeight</code>,
606 will cause the server to include <code>height</code> and
607 <code>width</code> attributes in the <code>img</code> tag for
608 the file icon. This allows browser to precalculate the page
609 layout without having to wait until all the images have been
610 loaded. If no value is given for the option, it defaults to
611 the standard width of the icons supplied with the Apache
614 <dt><a name="indexoptions.ignorecase"
615 id="indexoptions.ignorecase">IgnoreCase</a></dt>
617 <dd>If this option is enabled, names are sorted in a case-insensitive
618 manner. For instance, if the sort order is ascending by name, and
619 IgnoreCase is enabled, file Zeta will be listed after file alfa
620 (Note: file GAMMA will always be listed before file gamma). </dd>
622 <dt><a name="indexoptions.ignoreclient"
623 id="indexoptions.ignoreclient">IgnoreClient</a></dt>
625 <dd>This option causes <module>mod_autoindex</module> to ignore all
626 query variables from the client, including sort order (implies
627 <code><a href="#indexoptions.suppresscolumnsorting"
628 >SuppressColumnSorting</a></code>.)</dd>
630 <dt><a name="indexoptions.namewidth"
631 id="indexoptions.namewidth">NameWidth=[<var>n</var>
634 <dd>The <code>NameWidth</code> keyword allows you to specify the width
635 of the filename column in bytes.</dd>
637 <dd><code>-NameWidth</code> (or unset) allows <module
638 >mod_autoindex</module> to calculate the best width.</dd>
640 <dd><code>NameWidth=<var>n</var></code> fixes the column width to
641 <var>n</var> bytes wide.</dd>
643 <dd><code>NameWidth=*</code> grows the column to the necessary
646 <dt><a name="indexoptions.scanhtmltitles"
647 id="indexoptions.scanhtmltitles">ScanHTMLTitles</a></dt>
649 <dd>This enables the extraction of the title from HTML documents
650 for fancy indexing. If the file does not have a description
651 given by <directive module="mod_autoindex">AddDescription</directive>
652 then httpd will read the document for the value of the
653 <code>title</code> element. This is CPU and disk intensive.</dd>
655 <dt><a name="indexoptions.showforbidden"
656 id="indexoptions.showforbidden">ShowForbidden</a></dt>
658 <dd>If specified, Apache will show files normally hidden because
659 the subrequest returned HTTP_UNAUTHORIZED or HTTP_FORBIDDEN</dd>
661 <dt><a name="indexoptions.suppresscolumnsorting"
662 id="indexoptions.suppresscolumnsorting"
663 >SuppressColumnSorting</a></dt>
665 <dd>If specified, Apache will not make the column headings in a
666 FancyIndexed directory listing into links for sorting. The
667 default behavior is for them to be links; selecting the
668 column heading will sort the directory listing by the values
669 in that column. <strong>Prior to Apache 2.0.23, this also
670 disabled parsing the Query Arguments for the sort
671 string.</strong> That behavior is now controlled by <a
672 href="#indexoptions.ignoreclient">IndexOptions
673 IgnoreClient</a> in Apache 2.0.23.</dd>
675 <dt><a name="indexoptions.suppressdescription"
676 id="indexoptions.suppressdescription"
677 >SuppressDescription</a></dt>
679 <dd>This will suppress the file description in fancy indexing
680 listings. By default, no file descriptions are defined, and
681 so the use of this option will regain 23 characters of screen
682 space to use for something else. See <directive module="mod_autoindex"
683 >AddDescription</directive> for information about setting the file
684 description. See also the <code><a
685 href="#indexoptions.descriptionwidth">DescriptionWidth</a></code>
686 index option to limit the size of the description column.</dd>
688 <dt><a name="indexoptions.suppresshtmlpreamble"
689 id="indexoptions.suppresshtmlpreamble"
690 >SuppressHTMLPreamble</a></dt>
692 <dd>If the directory actually contains a file specified by the
693 <directive module="mod_autoindex">HeaderName</directive>
694 directive, the module usually includes the contents of the file
695 after a standard HTML preamble (<code><html></code>,
696 <code><head></code>, <em>et cetera</em>). The
697 <code>SuppressHTMLPreamble</code> option disables this behaviour,
698 causing the module to start the display with the header file
699 contents. The header file must contain appropriate HTML instructions
700 in this case. If there is no header file, the preamble is generated
703 <dt><a name="indexoptions.suppressicon"
704 id="indexoptions.suppressicon">SuppressIcon</a> (<em>Apache
705 2.0.23 and later</em>)</dt>
707 <dd>This will suppress the icon in fancy indexing listings.
708 Combining both <code>SuppressIcon</code> and
709 <code>SuppressRules</code> yields proper HTML 3.2 output, which
710 by the final specification prohibits <code>img</code> and
711 <code>hr</code> elements from the <code>pre</code> block (used to
712 format FancyIndexed listings.)</dd>
714 <dt><a name="indexoptions.suppresslastmodified"
715 id="indexoptions.suppresslastmodified"
716 >SuppressLastModified</a></dt>
718 <dd>This will suppress the display of the last modification date,
719 in fancy indexing listings.</dd>
721 <dt><a name="indexoptions.suppressrules"
722 id="indexoptions.suppressrules">SuppressRules</a>
723 (<em>Apache 2.0.23 and later</em>)</dt>
725 <dd>This will suppress the horizontal rule lines (<code>hr</code>
726 elements) in directory listings. Combining both <code>SuppressIcon</code> and
727 <code>SuppressRules</code> yields proper HTML 3.2 output, which
728 by the final specification prohibits <code>img</code> and
729 <code>hr</code> elements from the <code>pre</code> block (used to
730 format FancyIndexed listings.)</dd>
732 <dt><a name="indexoptions.suppresssize"
733 id="indexoptions.suppresssize">SuppressSize</a></dt>
735 <dd>This will suppress the file size in fancy indexing listings.</dd>
737 <dt><a name="indexoptions.trackmodified"
738 id="indexoptions.trackmodified">TrackModified</a> (<em>Apache
739 2.0.23 and later</em>)</dt>
741 <dd>This returns the Last-Modified and ETag values for the listed
742 directory in the HTTP header. It is only valid if the
743 operating system and file system return appropriate stat()
744 results. Some Unix systems do so, as do OS2's JFS and Win32's
745 NTFS volumes. OS2 and Win32 FAT volumes, for example, do not.
746 Once this feature is enabled, the client or proxy can track
747 changes to the list of files when they perform a <code>HEAD</code>
748 request. Note some operating systems correctly track new and
749 removed files, but do not track changes for sizes or dates of
750 the files within the directory. <strong>Changes to the size
751 or date stamp of an existing file will not update the
752 Last-Modified header on all Unix platforms.</strong> If this
753 is a concern, leave this option disabled.</dd>
755 <dt><a name="indexoptions.versionsort"
756 id="indexoptions.versionsort">VersionSort</a>
757 (<em>Apache 2.0a3 and later</em>)</dt>
759 <dd>The <code>VersionSort</code> keyword causes files containing
760 version numbers to sort in a natural way. Strings are sorted as
761 usual, except that substrings of digits in the name and
762 description are compared according to their numeric value.
764 <example><title>Example:</title>
773 <p>If the number starts with a zero, then it is considered to
784 <dt><a name="indexoptions.xhtml"
785 id="indexoptions.xhtml">XHTML</a>
786 (<em>Apache 2.0.49 and later</em>)</dt>
788 <dd>The <code>XHTML</code> keyword forces <module>mod_autoindex</module>
789 to emit XHTML 1.0 code instead of HTML 3.2.</dd>
793 XXX: we should consider to allow sections inside <usage>
794 this would require some xslt changes...
796 <dl><dt>Incremental IndexOptions</dt>
798 <p>Apache 1.3.3 introduced some significant changes in the
799 handling of <directive>IndexOptions</directive> directives. In
803 <li>Multiple <directive>IndexOptions</directive> directives for a
804 single directory are now merged together. The result of:
807 <Directory /foo>
809 IndexOptions HTMLTable<br />
810 IndexOptions SuppressColumnsorting
815 <p>will be the equivalent of</p>
818 IndexOptions HTMLTable SuppressColumnsorting
822 <li>The addition of the incremental syntax (<em>i.e.</em>, prefixing
823 keywords with <code>+</code> or <code>-</code>).</li>
826 <p>Whenever a '+' or '-' prefixed keyword is encountered, it
827 is applied to the current <directive>IndexOptions</directive>
828 settings (which may have been inherited from an upper-level
829 directory). However, whenever an unprefixed keyword is processed, it
830 clears all inherited options and any incremental settings encountered
831 so far. Consider the following example:</p>
834 IndexOptions +ScanHTMLTitles -IconsAreLinks FancyIndexing<br />
835 IndexOptions +SuppressSize
838 <p>The net effect is equivalent to <code>IndexOptions FancyIndexing
839 +SuppressSize</code>, because the unprefixed <code>FancyIndexing</code>
840 discarded the incremental keywords before it, but allowed them to
841 start accumulating again afterward.</p>
843 <p>To unconditionally set the <directive>IndexOptions</directive> for
844 a particular directory, clearing the inherited settings, specify
845 keywords without any <code>+</code> or <code>-</code> prefixes.</p>
852 <name>IndexOrderDefault</name>
853 <description>Sets the default ordering of the directory index</description>
854 <syntax>IndexOrderDefault Ascending|Descending
855 Name|Date|Size|Description</syntax>
856 <default>IndexOrderDefault Ascending Name</default>
857 <contextlist><context>server config</context><context>virtual host</context>
858 <context>directory</context><context>.htaccess</context>
860 <override>Indexes</override>
863 <p>The <directive>IndexOrderDefault</directive> directive is used
864 in combination with the <code><a href="#indexoptions.fancyindexing"
865 >FancyIndexing</a></code> index option. By default, fancyindexed
866 directory listings are displayed in ascending order by filename; the
867 <directive>IndexOrderDefault</directive> allows you to change this
868 initial display order.</p>
870 <p><directive>IndexOrderDefault</directive> 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
880 href="#indexoptions.suppresscolumnsorting"
881 >SuppressColumnSorting</a></code> index option; this will prevent
882 the client from requesting the directory listing in a different
888 <name>IndexStyleSheet</name>
889 <description>Adds a CSS stylesheet to the directory index</description>
890 <syntax>IndexStyleSheet <var>url-path</var></syntax>
891 <contextlist><context>server config</context><context>virtual host</context>
892 <context>directory</context><context>.htaccess</context>
894 <override>Indexes</override>
897 <p>The <directive>IndexStyleSheet</directive> directive sets the name of
898 the file that will be used as the CSS for the index listing.
901 <title>Example</title>
902 IndexStyleSheet "/css/style.css"
908 <name>ReadmeName</name>
909 <description>Name of the file that will be inserted at the end
910 of the index listing</description>
911 <syntax>ReadmeName <var>filename</var></syntax>
912 <contextlist><context>server config</context><context>virtual host</context>
913 <context>directory</context><context>.htaccess</context>
915 <override>Indexes</override>
918 <p>The <directive>ReadmeName</directive> directive sets the name
919 of the file that will be appended to the end of the index
920 listing. <var>Filename</var> is the name of the file to include, and
921 is taken to be relative to the location being indexed. If
922 <var>Filename</var> begins with a slash, it will be taken to be
923 relative to the <directive module="core">DocumentRoot</directive>.
926 <example><title>Example</title>
927 ReadmeName FOOTER.html
930 <example><title>Example 2</title>
931 ReadmeName /include/FOOTER.html
934 <p>See also <directive module="mod_autoindex"
935 >HeaderName</directive>, where this behavior is described in greater