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