📄 mod_autoindex.html.en
字号:
<div class="example"><h3>Examples</h3><p><code> AddAlt "PDF file" *.pdf<br /> AddAlt Compressed *.gz *.zip *.Z </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="AddAltByEncoding" id="AddAltByEncoding">AddAltByEncoding</a> <a name="addaltbyencoding" id="addaltbyencoding">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Alternate text to display for a file instead of an iconselected by MIME-encoding</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AddAltByEncoding <var>string</var> <var>MIME-encoding</var>[<var>MIME-encoding</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><code class="directive">AddAltByEncoding</code> provides the alternate text to display for a file, instead of an icon, for <code><a href="#indexoptions.fancyindexing">FancyIndexing</a></code>. <var>MIME-encoding</var> is a valid content-encoding, such as <code>x-compress</code>. If <var>String</var> contains any whitespace, you have to enclose it in quotes (<code>"</code> or <code>'</code>). This alternate text is displayed if the client is image-incapable, has image loading disabled, or fails to retrieve the icon.</p> <div class="example"><h3>Example</h3><p><code> AddAltByEncoding gzip x-gzip </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="AddAltByType" id="AddAltByType">AddAltByType</a> <a name="addaltbytype" id="addaltbytype">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Alternate text to display for a file, instead of anicon selected by MIME content-type</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AddAltByType <var>string</var> <var>MIME-type</var>[<var>MIME-type</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><code class="directive">AddAltByType</code> sets the alternate text to display for a file, instead of an icon, for <code><a href="#indexoptions.fancyindexing">FancyIndexing</a></code>. <var>MIME-type</var> is a valid content-type, such as <code>text/html</code>. If <var>String</var> contains any whitespace, you have to enclose it in quotes (<code>"</code> or <code>'</code>). This alternate text is displayed if the client is image-incapable, has image loading disabled, or fails to retrieve the icon.</p> <div class="example"><h3>Example</h3><p><code> AddAltByType 'plain text' text/plain </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="AddDescription" id="AddDescription">AddDescription</a> <a name="adddescription" id="adddescription">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Description to display for a file</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AddDescription <var>string file</var> [<var>file</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>This sets the description to display for a file, for <code><a href="#indexoptions.fancyindexing">FancyIndexing</a></code>. <var>File</var> is a file extension, partial filename, wild-card expression or full filename for files to describe. <var>String</var> is enclosed in double quotes (<code>"</code>).</p> <div class="example"><h3>Example</h3><p><code> AddDescription "The planet Mars" /web/pics/mars.gif </code></p></div> <p>The typical, default description field is 23 bytes wide. 6 more bytes are added by the <code><a href="#indexoptions.suppressicon">IndexOptions SuppressIcon</a></code> option, 7 bytes are added by the <code><a href="#indexoptions.suppresssize">IndexOptions SuppressSize</a></code> option, and 19 bytes are added by the <code><a href="#indexoptions.suppresslastmodified">IndexOptions SuppressLastModified</a></code> option. Therefore, the widest default the description column is ever assigned is 55 bytes.</p> <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 of this column, or allowing descriptions of unlimited length.</p> <div class="note"><h3>Caution</h3> <p>Descriptive text defined with <code class="directive">AddDescription</code> may contain HTML markup, such as tags and character entities. If the width of the description column should happen to truncate a tagged element (such as cutting off the end of a bolded phrase), the results may affect the rest of the directory listing.</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="AddIcon" id="AddIcon">AddIcon</a> <a name="addicon" id="addicon">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Icon to display for a file selected by name</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AddIcon <var>icon</var> <var>name</var> [<var>name</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>This sets the icon to display next to a file ending in <var>name</var> for <code><a href="#indexoptions.fancyindexing">FancyIndexing</a></code>. <var>Icon</var> is either a (%-escaped) relative URL to the icon, or of the format <code> (<var>alttext</var>,<var>url</var>)</code> where <var>alttext</var> is the text tag given for an icon for non-graphical browsers.</p> <p><var>Name</var> is either <code>^^DIRECTORY^^</code> for directories, <code>^^BLANKICON^^</code> for blank lines (to format the list correctly), a file extension, a wildcard expression, a partial filename or a complete filename.</p> <div class="example"><h3>Examples</h3><p><code> AddIcon (IMG,/icons/image.xbm) .gif .jpg .xbm<br /> AddIcon /icons/dir.xbm ^^DIRECTORY^^<br /> AddIcon /icons/backup.xbm *~ </code></p></div> <p><code class="directive"><a href="#addiconbytype">AddIconByType</a></code> should be used in preference to <code class="directive">AddIcon</code>, when possible.</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="AddIconByEncoding" id="AddIconByEncoding">AddIconByEncoding</a> <a name="addiconbyencoding" id="addiconbyencoding">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Icon to display next to files selected by MIME content-encoding</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AddIconByEncoding <var>icon</var> <var>MIME-encoding</var>[<var>MIME-encoding</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>This sets the icon to display next to files with <code><a href="#indexoptions.fancyindexing">FancyIndexing</a></code>. <var>Icon</var> is either a (%-escaped) relative URL to the icon, or of the format <code>(<var>alttext</var>,<var>url</var>)</code> where <var>alttext</var> is the text tag given for an icon for non-graphical browsers.</p> <p><var>MIME-encoding</var> is a wildcard expression matching required the content-encoding.</p> <div class="example"><h3>Example</h3><p><code> AddIconByEncoding /icons/compress.xbm x-compress </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="AddIconByType" id="AddIconByType">AddIconByType</a> <a name="addiconbytype" id="addiconbytype">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Icon to display next to files selected by MIME content-type</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AddIconByType <var>icon</var> <var>MIME-type</var>[<var>MIME-type</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>This sets the icon to display next to files of type <var>MIME-type</var> for <code><a href="#indexoptions.fancyindexing">FancyIndexing</a></code>. <var>Icon</var> is either a (%-escaped) relative URL to the icon, or of the format <code>(<var>alttext</var>,<var>url</var>)</code> where <var>alttext</var> is the text tag given for an icon for non-graphical browsers.</p> <p><var>MIME-type</var> is a wildcard expression matching required the mime types.</p> <div class="example"><h3>Example</h3><p><code> AddIconByType (IMG,/icons/image.xbm) image/* </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="DefaultIcon" id="DefaultIcon">DefaultIcon</a> <a name="defaulticon" id="defaulticon">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Icon to display for files when no specific icon isconfigured</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DefaultIcon <var>url-path</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">DefaultIcon</code> directive sets the icon to display for files when no specific icon is known, for <code><a href="#indexoptions.fancyindexing">FancyIndexing</a></code>. <var>Url-path</var> is a (%-escaped) relative URL to the icon.</p> <div class="example"><h3>Example</h3><p><code> DefaultIcon /icon/unknown.xbm </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="HeaderName" id="HeaderName">HeaderName</a> <a name="headername" id="headername">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 topof the index listing</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>HeaderName <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">HeaderName</code> directive sets the name of the file that will be inserted at the top of the index listing. <var>Filename</var> is the name of the file to include.</p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -