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