mod_autoindex.xml revision f6ece164c2e1055a3d02b10928e1623d18b1d625
d7759bdad133e1e92fe41aab75dd8c1584eda38cjim<!DOCTYPE modulesynopsis SYSTEM "/style/modulesynopsis.dtd">
d7759bdad133e1e92fe41aab75dd8c1584eda38cjim<?xml-stylesheet type="text/xsl" href="/style/manual.en.xsl"?>
4e191199a0aeab09d78df8f5579e745572e8b7bcwsanchez<!-- $LastChangedRevision$ -->
d7759bdad133e1e92fe41aab75dd8c1584eda38cjim Licensed to the Apache Software Foundation (ASF) under one or more
d7759bdad133e1e92fe41aab75dd8c1584eda38cjim contributor license agreements. See the NOTICE file distributed with
d7759bdad133e1e92fe41aab75dd8c1584eda38cjim this work for additional information regarding copyright ownership.
d7759bdad133e1e92fe41aab75dd8c1584eda38cjim The ASF licenses this file to You under the Apache License, Version 2.0
b3155b9e3b06b20030ec6c16d98f8dabf12ead9cianh (the "License"); you may not use this file except in compliance with
b3155b9e3b06b20030ec6c16d98f8dabf12ead9cianh the License. You may obtain a copy of the License at
b3155b9e3b06b20030ec6c16d98f8dabf12ead9cianh Unless required by applicable law or agreed to in writing, software
b3155b9e3b06b20030ec6c16d98f8dabf12ead9cianh distributed under the License is distributed on an "AS IS" BASIS,
b3155b9e3b06b20030ec6c16d98f8dabf12ead9cianh WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
ff1234e45aca1b8171d711ecb87f58b9d9100a99ianh See the License for the specific language governing permissions and
ff1234e45aca1b8171d711ecb87f58b9d9100a99ianh limitations under the License.
ff1234e45aca1b8171d711ecb87f58b9d9100a99ianh<description>Generates directory indexes,
b999f6ba2a266bf9a92687f31bb7e76021ac5891ianh automatically, similar to the Unix <code>ls</code> command or the
2ceedfca3a2fdfdb5ff60ca17f030ce91f6331cbwrowe <p>The index of a directory can come from one of two
2ceedfca3a2fdfdb5ff60ca17f030ce91f6331cbwrowe sources:</p>
b999f6ba2a266bf9a92687f31bb7e76021ac5891ianh <li>A file written by the user, typically called
1f3a44f2fd7f9fee00b80c7ddcf1028ea145f91drbb module="mod_dir">DirectoryIndex</directive> directive sets the
b9b69856aec9ea58ea1b1e5aff669e8eaf2ebce4rbb name of this file. This is controlled by
1f3a44f2fd7f9fee00b80c7ddcf1028ea145f91drbb <li>Otherwise, a listing generated by the server. The other
1f3a44f2fd7f9fee00b80c7ddcf1028ea145f91drbb directives control the format of this listing. The <directive
7d7931c1f4d46b041ad2ad6fdb9499289063611eianh module="mod_autoindex">AddIconByEncoding</directive> and
1f3a44f2fd7f9fee00b80c7ddcf1028ea145f91drbb <directive module="mod_autoindex">AddIconByType</directive> are
68bcde9c52e9e749482df2800dbdff09559115e0chuck used to set a list of icons to display for various file types;
0c233c76f21b358f4a0d81e0f956339ca727c14cchuck for each file listed, the first icon listed that matches the
43ea154f46345c9722c2b25b2b9f5086ec79eaeeorlikowski file is displayed. These are controlled by
0c233c76f21b358f4a0d81e0f956339ca727c14cchuck <p>The two functions are separated so that you can completely
0c233c76f21b358f4a0d81e0f956339ca727c14cchuck remove (or replace) automatic index generation should you want
0c233c76f21b358f4a0d81e0f956339ca727c14cchuck <p>Automatic index generation is enabled with using
53c2eb831bfe47860e3f5ec9190b15cb92f15181chuck <directive module="core">Options</directive> directive for
0c233c76f21b358f4a0d81e0f956339ca727c14cchuck more details.</p>
c1635d9f723f28fed4b95e5d9693e554a79e8d77orlikowski <p>If the <code><a href="#indexoptions.fancyindexing"
c1635d9f723f28fed4b95e5d9693e554a79e8d77orlikowski >FancyIndexing</a></code> option is given with the <directive
c1635d9f723f28fed4b95e5d9693e554a79e8d77orlikowski module="mod_autoindex">IndexOptions</directive> directive,
c1635d9f723f28fed4b95e5d9693e554a79e8d77orlikowski the column headers are links that control the order of the
c1635d9f723f28fed4b95e5d9693e554a79e8d77orlikowski display. If you select a header link, the listing will be
c1635d9f723f28fed4b95e5d9693e554a79e8d77orlikowski regenerated, sorted by the values in that column. Selecting the
c1635d9f723f28fed4b95e5d9693e554a79e8d77orlikowski same header repeatedly toggles between ascending and descending
4f7dd0949d92462a8adc31eee8aff266eea55204chuck order. These column header links are suppressed with the
4f7dd0949d92462a8adc31eee8aff266eea55204chuck <directive module="mod_autoindex">IndexOptions</directive> directive's
4f7dd0949d92462a8adc31eee8aff266eea55204chuck <p>Note that when the display is sorted by "Size", it's the
75b3ed55173b29dbdf9e2fb6ec5462bfceee21aechuck <em>actual</em> size of the files that's used, not the
75b3ed55173b29dbdf9e2fb6ec5462bfceee21aechuck displayed value - so a 1010-byte file will always be displayed
75b3ed55173b29dbdf9e2fb6ec5462bfceee21aechuck before a 1011-byte file (if in ascending order) even though
4f7dd0949d92462a8adc31eee8aff266eea55204chuck they both are shown as "1K".</p>
68bcde9c52e9e749482df2800dbdff09559115e0chuck <p>Apache HTTP Server 2.0.23 reorganized the Query Arguments for Column
68bcde9c52e9e749482df2800dbdff09559115e0chuck Sorting, and introduced an entire group of new query options.
68bcde9c52e9e749482df2800dbdff09559115e0chuck To effectively eliminate all client control over the output,
68bcde9c52e9e749482df2800dbdff09559115e0chuck the <code><a href="#indexoptions.ignoreclient">IndexOptions
68bcde9c52e9e749482df2800dbdff09559115e0chuck <p>The column sorting headers themselves are self-referencing
68bcde9c52e9e749482df2800dbdff09559115e0chuck hyperlinks that add the sort query options shown below. Any
68bcde9c52e9e749482df2800dbdff09559115e0chuck option below may be added to any request for the directory
68bcde9c52e9e749482df2800dbdff09559115e0chuck resource.</p>
68bcde9c52e9e749482df2800dbdff09559115e0chuck <li><code>C=N</code> sorts the directory by file name</li>
68bcde9c52e9e749482df2800dbdff09559115e0chuck <li><code>C=M</code> sorts the directory by last-modified
68bcde9c52e9e749482df2800dbdff09559115e0chuck date, then file name</li>
68bcde9c52e9e749482df2800dbdff09559115e0chuck <li><code>C=S</code> sorts the directory by size, then file
68bcde9c52e9e749482df2800dbdff09559115e0chuck <li class="separate"><code>C=D</code> sorts the directory by description, then
68bcde9c52e9e749482df2800dbdff09559115e0chuck file name</li>
68bcde9c52e9e749482df2800dbdff09559115e0chuck <li class="separate"><code>O=D</code> sorts the listing in Descending
0c233c76f21b358f4a0d81e0f956339ca727c14cchuck <li><code>F=0</code> formats the listing as a simple list
0c233c76f21b358f4a0d81e0f956339ca727c14cchuck (not FancyIndexed)</li>
68bcde9c52e9e749482df2800dbdff09559115e0chuck <li><code>F=1</code> formats the listing as a FancyIndexed
68bcde9c52e9e749482df2800dbdff09559115e0chuck <li class="separate"><code>F=2</code> formats the listing as an
68bcde9c52e9e749482df2800dbdff09559115e0chuck HTMLTable FancyIndexed list</li>
68bcde9c52e9e749482df2800dbdff09559115e0chuck <li class="separate"><code>V=1</code> enables version sorting</li>
68bcde9c52e9e749482df2800dbdff09559115e0chuck <li><code>P=<var>pattern</var></code> lists only files matching
68bcde9c52e9e749482df2800dbdff09559115e0chuck <p>Note that the 'P'attern query argument is tested
68bcde9c52e9e749482df2800dbdff09559115e0chuck <em>after</em> the usual <directive module="mod_autoindex"
68bcde9c52e9e749482df2800dbdff09559115e0chuck >IndexIgnore</directive> directives are processed,
68bcde9c52e9e749482df2800dbdff09559115e0chuck and all file names are still subjected to the same criteria as
68bcde9c52e9e749482df2800dbdff09559115e0chuck any other autoindex listing. The Query Arguments parser in
68bcde9c52e9e749482df2800dbdff09559115e0chuck <module>mod_autoindex</module> will stop abruptly when an unrecognized
68bcde9c52e9e749482df2800dbdff09559115e0chuck option is encountered. The Query Arguments must be well formed,
68bcde9c52e9e749482df2800dbdff09559115e0chuck according to the table above.</p>
68bcde9c52e9e749482df2800dbdff09559115e0chuck <p>The simple example below, which can be clipped and saved in
68bcde9c52e9e749482df2800dbdff09559115e0chuck a header.html file, illustrates these query options. Note that
0c233c76f21b358f4a0d81e0f956339ca727c14cchuck the unknown "X" argument, for the submit button, is listed last
0c233c76f21b358f4a0d81e0f956339ca727c14cchuck to assure the arguments are all parsed before mod_autoindex
68bcde9c52e9e749482df2800dbdff09559115e0chuck encounters the X=Go input.</p>
68bcde9c52e9e749482df2800dbdff09559115e0chuck <form action="" method="get"><br />
68bcde9c52e9e749482df2800dbdff09559115e0chuck Show me a <select name="F"><br />
68bcde9c52e9e749482df2800dbdff09559115e0chuck <option value="0"> Plain list</option><br />
68bcde9c52e9e749482df2800dbdff09559115e0chuck <option value="1" selected="selected"> Fancy list</option><br />
68bcde9c52e9e749482df2800dbdff09559115e0chuck <option value="2"> Table list</option><br />
68bcde9c52e9e749482df2800dbdff09559115e0chuck </select><br />
68bcde9c52e9e749482df2800dbdff09559115e0chuck Sorted by <select name="C"><br />
68bcde9c52e9e749482df2800dbdff09559115e0chuck <option value="N" selected="selected"> Name</option><br />
68bcde9c52e9e749482df2800dbdff09559115e0chuck <option value="M"> Date Modified</option><br />
68bcde9c52e9e749482df2800dbdff09559115e0chuck <option value="S"> Size</option><br />
0c233c76f21b358f4a0d81e0f956339ca727c14cchuck <option value="D"> Description</option><br />
68bcde9c52e9e749482df2800dbdff09559115e0chuck </select><br />
68bcde9c52e9e749482df2800dbdff09559115e0chuck <select name="O"><br />
68bcde9c52e9e749482df2800dbdff09559115e0chuck <option value="A" selected="selected"> Ascending</option><br />
68bcde9c52e9e749482df2800dbdff09559115e0chuck <option value="D"> Descending</option><br />
68bcde9c52e9e749482df2800dbdff09559115e0chuck </select><br />
68bcde9c52e9e749482df2800dbdff09559115e0chuck <select name="V"><br />
68bcde9c52e9e749482df2800dbdff09559115e0chuck <option value="0" selected="selected"> in Normal order</option><br />
68bcde9c52e9e749482df2800dbdff09559115e0chuck <option value="1"> in Version order</option><br />
68bcde9c52e9e749482df2800dbdff09559115e0chuck </select><br />
68bcde9c52e9e749482df2800dbdff09559115e0chuck Matching <input type="text" name="P" value="*" /><br />
68bcde9c52e9e749482df2800dbdff09559115e0chuck <input type="submit" name="X" value="Go" /><br />
0c233c76f21b358f4a0d81e0f956339ca727c14cchuck </form>
68bcde9c52e9e749482df2800dbdff09559115e0chuck<directivesynopsis>
68bcde9c52e9e749482df2800dbdff09559115e0chuck<description>Alternate text to display for a file, instead of an
68bcde9c52e9e749482df2800dbdff09559115e0chuckicon selected by filename</description>
68bcde9c52e9e749482df2800dbdff09559115e0chuck<syntax>AddAlt <var>string</var> <var>file</var> [<var>file</var>] ...</syntax>
68bcde9c52e9e749482df2800dbdff09559115e0chuck<contextlist><context>server config</context><context>virtual host</context>
68bcde9c52e9e749482df2800dbdff09559115e0chuck<context>directory</context><context>.htaccess</context>
68bcde9c52e9e749482df2800dbdff09559115e0chuck</contextlist>
68bcde9c52e9e749482df2800dbdff09559115e0chuck <p><directive>AddAlt</directive> provides the alternate text to
68bcde9c52e9e749482df2800dbdff09559115e0chuck href="#indexoptions.fancyindexing">FancyIndexing</a></code>.
68bcde9c52e9e749482df2800dbdff09559115e0chuck <var>File</var> is a file extension, partial filename, wild-card
68bcde9c52e9e749482df2800dbdff09559115e0chuck expression or full filename for files to describe.
68bcde9c52e9e749482df2800dbdff09559115e0chuck If <var>String</var> contains any whitespace, you have to enclose it
68bcde9c52e9e749482df2800dbdff09559115e0chuck in quotes (<code>"</code> or <code>'</code>). This alternate text
68bcde9c52e9e749482df2800dbdff09559115e0chuck is displayed if the client is image-incapable, has image loading
68bcde9c52e9e749482df2800dbdff09559115e0chuck disabled, or fails to retrieve the icon.</p>
68bcde9c52e9e749482df2800dbdff09559115e0chuck AddAlt "PDF file" *.pdf<br />
68bcde9c52e9e749482df2800dbdff09559115e0chuck AddAlt Compressed *.gz *.zip *.Z
68bcde9c52e9e749482df2800dbdff09559115e0chuck</directivesynopsis>
68bcde9c52e9e749482df2800dbdff09559115e0chuck<directivesynopsis>
68bcde9c52e9e749482df2800dbdff09559115e0chuck<description>Alternate text to display for a file instead of an icon
68bcde9c52e9e749482df2800dbdff09559115e0chuckselected by MIME-encoding</description>
4f7dd0949d92462a8adc31eee8aff266eea55204chuck<syntax>AddAltByEncoding <var>string</var> <var>MIME-encoding</var>
68bcde9c52e9e749482df2800dbdff09559115e0chuck<contextlist><context>server config</context><context>virtual host</context>
4f7dd0949d92462a8adc31eee8aff266eea55204chuck<context>directory</context><context>.htaccess</context>
4f7dd0949d92462a8adc31eee8aff266eea55204chuck</contextlist>
68bcde9c52e9e749482df2800dbdff09559115e0chuck <p><directive>AddAltByEncoding</directive> provides the alternate
HeaderName HEADER.html
id="indexoptions.charset"
id="indexoptions.type"
IndexHeadInsert "<link rel=\"sitemap\" href=\"/sitemap.html\">"
ReadmeName FOOTER.html