📄 mod_autoindex.html.en
字号:
directive, the module usually includes the contents of the file
after a standard HTML preamble (<code><html></code>,
<code><head></code>, <em>et cetera</em>). The
<code>SuppressHTMLPreamble</code> option disables this behaviour,
causing the module to start the display with the header file
contents. The header file must contain appropriate HTML instructions
in this case. If there is no header file, the preamble is generated
as usual.</dd>
<dt><a name="indexoptions.suppressicon" id="indexoptions.suppressicon">SuppressIcon</a> (<em>Apache
2.0.23 and later</em>)</dt>
<dd>This will suppress the icon in fancy indexing listings.
Combining both <code>SuppressIcon</code> and
<code>SuppressRules</code> yields proper HTML 3.2 output, which
by the final specification prohibits <code>img</code> and
<code>hr</code> elements from the <code>pre</code> block (used to
format FancyIndexed listings.)</dd>
<dt><a name="indexoptions.suppresslastmodified" id="indexoptions.suppresslastmodified">SuppressLastModified</a></dt>
<dd>This will suppress the display of the last modification date,
in fancy indexing listings.</dd>
<dt><a name="indexoptions.suppressrules" id="indexoptions.suppressrules">SuppressRules</a>
(<em>Apache 2.0.23 and later</em>)</dt>
<dd>This will suppress the horizontal rule lines (<code>hr</code>
elements) in directory listings. Combining both <code>SuppressIcon</code> and
<code>SuppressRules</code> yields proper HTML 3.2 output, which
by the final specification prohibits <code>img</code> and
<code>hr</code> elements from the <code>pre</code> block (used to
format FancyIndexed listings.)</dd>
<dt><a name="indexoptions.suppresssize" id="indexoptions.suppresssize">SuppressSize</a></dt>
<dd>This will suppress the file size in fancy indexing listings.</dd>
<dt><a name="indexoptions.trackmodified" id="indexoptions.trackmodified">TrackModified</a> (<em>Apache
2.0.23 and later</em>)</dt>
<dd>This returns the Last-Modified and ETag values for the listed
directory in the HTTP header. It is only valid if the
operating system and file system return appropriate stat()
results. Some Unix systems do so, as do OS2's JFS and Win32's
NTFS volumes. OS2 and Win32 FAT volumes, for example, do not.
Once this feature is enabled, the client or proxy can track
changes to the list of files when they perform a <code>HEAD</code>
request. Note some operating systems correctly track new and
removed files, but do not track changes for sizes or dates of
the files within the directory. <strong>Changes to the size
or date stamp of an existing file will not update the
Last-Modified header on all Unix platforms.</strong> If this
is a concern, leave this option disabled.</dd>
<dt><a name="indexoptions.versionsort" id="indexoptions.versionsort">VersionSort</a>
(<em>Apache 2.0a3 and later</em>)</dt>
<dd>The <code>VersionSort</code> keyword causes files containing
version numbers to sort in a natural way. Strings are sorted as
usual, except that substrings of digits in the name and
description are compared according to their numeric value.
<div class="example"><h3>Example:</h3><p><code>
foo-1.7<br />
foo-1.7.2<br />
foo-1.7.12<br />
foo-1.8.2<br />
foo-1.8.2a<br />
foo-1.12
</code></p></div>
<p>If the number starts with a zero, then it is considered to
be a fraction:</p>
<div class="example"><p><code>
foo-1.001<br />
foo-1.002<br />
foo-1.030<br />
foo-1.04
</code></p></div>
</dd>
<dt><a name="indexoptions.xhtml" id="indexoptions.xhtml">XHTML</a>
(<em>Apache 2.0.49 and later</em>)</dt>
<dd>The <code>XHTML</code> keyword forces <code class="module"><a href="../mod/mod_autoindex.html">mod_autoindex</a></code>
to emit XHTML 1.0 code instead of HTML 3.2.</dd>
</dl>
<dl><dt>Incremental IndexOptions</dt>
<dd>
<p>Apache 1.3.3 introduced some significant changes in the
handling of <code class="directive">IndexOptions</code> directives. In
particular:</p>
<ul>
<li>Multiple <code class="directive">IndexOptions</code> directives for a
single directory are now merged together. The result of:
<div class="example"><p><code>
<Directory /foo>
<span class="indent">
IndexOptions HTMLTable<br />
IndexOptions SuppressColumnsorting
</span>
</Directory>
</code></p></div>
<p>will be the equivalent of</p>
<div class="example"><p><code>
IndexOptions HTMLTable SuppressColumnsorting
</code></p></div>
</li>
<li>The addition of the incremental syntax (<em>i.e.</em>, prefixing
keywords with <code>+</code> or <code>-</code>).</li>
</ul>
<p>Whenever a '+' or '-' prefixed keyword is encountered, it
is applied to the current <code class="directive">IndexOptions</code>
settings (which may have been inherited from an upper-level
directory). However, whenever an unprefixed keyword is processed, it
clears all inherited options and any incremental settings encountered
so far. Consider the following example:</p>
<div class="example"><p><code>
IndexOptions +ScanHTMLTitles -IconsAreLinks FancyIndexing<br />
IndexOptions +SuppressSize
</code></p></div>
<p>The net effect is equivalent to <code>IndexOptions FancyIndexing
+SuppressSize</code>, because the unprefixed <code>FancyIndexing</code>
discarded the incremental keywords before it, but allowed them to
start accumulating again afterward.</p>
<p>To unconditionally set the <code class="directive">IndexOptions</code> for
a particular directory, clearing the inherited settings, specify
keywords without any <code>+</code> or <code>-</code> prefixes.</p>
</dd>
</dl>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="IndexOrderDefault" id="IndexOrderDefault">IndexOrderDefault</a> <a name="indexorderdefault" id="indexorderdefault">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Sets the default ordering of the directory index</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>IndexOrderDefault Ascending|Descending
Name|Date|Size|Description</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>IndexOrderDefault Ascending Name</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
</table>
<p>The <code class="directive">IndexOrderDefault</code> directive is used
in combination with the <code><a href="#indexoptions.fancyindexing">FancyIndexing</a></code> index option. By default, fancyindexed
directory listings are displayed in ascending order by filename; the
<code class="directive">IndexOrderDefault</code> allows you to change this
initial display order.</p>
<p><code class="directive">IndexOrderDefault</code> takes two
arguments. The first must be either <code>Ascending</code> or
<code>Descending</code>, indicating the direction of the sort.
The second argument must be one of the keywords <code>Name</code>,
<code>Date</code>, <code>Size</code>, or <code>Description</code>,
and identifies the primary key. The secondary key is
<em>always</em> the ascending filename.</p>
<p>You can force a directory listing to only be displayed in a
particular order by combining this directive with the <code><a href="#indexoptions.suppresscolumnsorting">SuppressColumnSorting</a></code> index option; this will prevent
the client from requesting the directory listing in a different
order.</p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="ReadmeName" id="ReadmeName">ReadmeName</a> <a name="readmename" id="readmename">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Name of the file that will be inserted at the end
of the index listing</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ReadmeName <var>filename</var></code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_autoindex</td></tr>
</table>
<p>The <code class="directive">ReadmeName</code> directive sets the name
of the file that will be appended to the end of the index
listing. <var>Filename</var> is the name of the file to include, and
is taken to be relative to the location being indexed. If
<var>Filename</var> begins 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>
<div class="example"><h3>Example</h3><p><code>
ReadmeName FOOTER.html
</code></p></div>
<div class="example"><h3>Example 2</h3><p><code>
ReadmeName /include/FOOTER.html
</code></p></div>
<p>See also <code class="directive"><a href="#headername">HeaderName</a></code>, where this behavior is described in greater
detail.</p>
</div>
</div>
<div class="bottomlang">
<p><span>Available Languages: </span><a href="../en/mod/mod_autoindex.html" title="English"> en </a> |
<a href="../ja/mod/mod_autoindex.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
<a href="../ko/mod/mod_autoindex.html" hreflang="ko" rel="alternate" title="Korean"> ko </a></p>
</div><div id="footer">
<p class="apache">Copyright 2006 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>
<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -