📄 mod_autoindex.html
字号:
<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>和<code>SuppressRules</code> yields proper HTML 3.2 output, which
by the final specification prohibits <code>img</code>和<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>示例:</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>或<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>或<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">指令</a></h2>
<table border="1" cellpadding="0" cellspacing="0" bordercolor="#AAAAAA" class="directive">
<tr><th><a href="directive-dict.html#Description">说明</a></th><td>Sets the default ordering of the directory index</td></tr>
<tr><th><a href="directive-dict.html#Syntax">语法</a></th><td><code>IndexOrderDefault Ascending|Descending
Name|Date|Size|Description</code></td></tr>
<tr><th><a href="directive-dict.html#Default">默认值</a></th><td><code>IndexOrderDefault Ascending Name</code></td></tr>
<tr><th><a href="directive-dict.html#Context">作用域</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">覆盖项</a></th><td>Indexes</td></tr>
<tr><th><a href="directive-dict.html#Status">状态</a></th><td>基本(B)</td></tr>
<tr><th><a href="directive-dict.html#Module">模块</a></th><td>mod_autoindex</td></tr>
</table>
<p><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>或<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="IndexStyleSheet" id="IndexStyleSheet">IndexStyleSheet</a> <a name="indexstylesheet" id="indexstylesheet">指令</a></h2>
<table border="1" cellpadding="0" cellspacing="0" bordercolor="#AAAAAA" class="directive">
<tr><th><a href="directive-dict.html#Description">说明</a></th><td>Adds a CSS stylesheet to the directory index</td></tr>
<tr><th><a href="directive-dict.html#Syntax">语法</a></th><td><code>IndexStyleSheet <var>url-path</var></code></td></tr>
<tr><th><a href="directive-dict.html#Context">作用域</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">覆盖项</a></th><td>Indexes</td></tr>
<tr><th><a href="directive-dict.html#Status">状态</a></th><td>基本(B)</td></tr>
<tr><th><a href="directive-dict.html#Module">模块</a></th><td>mod_autoindex</td></tr>
</table>
<p><code class="directive">IndexStyleSheet</code> directive sets the name of
the file that will be used as the CSS for the index listing.
</p>
<div class="example"><h3>示例</h3><p><code>
IndexStyleSheet "/css/style.css"
</code></p></div>
</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">指令</a></h2>
<table border="1" cellpadding="0" cellspacing="0" bordercolor="#AAAAAA" class="directive">
<tr><th><a href="directive-dict.html#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">语法</a></th><td><code>ReadmeName <var>filename</var></code></td></tr>
<tr><th><a href="directive-dict.html#Context">作用域</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">覆盖项</a></th><td>Indexes</td></tr>
<tr><th><a href="directive-dict.html#Status">状态</a></th><td>基本(B)</td></tr>
<tr><th><a href="directive-dict.html#Module">模块</a></th><td>mod_autoindex</td></tr>
</table>
<p><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>示例</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 id="footer">
<p class="apache">本文允许自由使用、分发、转载,但必须保留译者署名;详见:<a href="../translator_announcement.html#announcement">译者声明</a>。</p>
<p class="menu"><a href="../mod/index.html">模块索引</a> | <a href="../mod/directives.html">指令索引</a> | <a href="../faq/index.html">常见问题</a> | <a href="../glossary.html">词汇表</a> | <a href="../sitemap.html">站点导航</a></p></div>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -