⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mod_autoindex.html

📁 这个是我在web培训时老师提供的手册
💻 HTML
📖 第 1 页 / 共 4 页
字号:
    has image loading disabled, or fails to retrieve the icon.</p>

    <div class="example"><h3>示例</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">指令</a></h2>
<table border="1" cellpadding="0" cellspacing="0" bordercolor="#AAAAAA" class="directive">
<tr><th><a href="directive-dict.html#Description">说明</a></th><td>Alternate text to display for a file, instead of an
icon selected by MIME content-type</td></tr>
<tr><th><a href="directive-dict.html#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">作用域</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">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>或<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>示例</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">指令</a></h2>
<table border="1" cellpadding="0" cellspacing="0" bordercolor="#AAAAAA" class="directive">
<tr><th><a href="directive-dict.html#Description">说明</a></th><td>Description to display for a file</td></tr>
<tr><th><a href="directive-dict.html#Syntax">语法</a></th><td><code>AddDescription <var>string file</var> [<var>file</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>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>示例</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">指令</a></h2>
<table border="1" cellpadding="0" cellspacing="0" bordercolor="#AAAAAA" class="directive">
<tr><th><a href="directive-dict.html#Description">说明</a></th><td>Icon to display for a file selected by name</td></tr>
<tr><th><a href="directive-dict.html#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">作用域</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>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>例子</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">指令</a></h2>
<table border="1" cellpadding="0" cellspacing="0" bordercolor="#AAAAAA" class="directive">
<tr><th><a href="directive-dict.html#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">语法</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">作用域</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>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>示例</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">指令</a></h2>
<table border="1" cellpadding="0" cellspacing="0" bordercolor="#AAAAAA" class="directive">
<tr><th><a href="directive-dict.html#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">语法</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">作用域</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>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>示例</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">指令</a></h2>
<table border="1" cellpadding="0" cellspacing="0" bordercolor="#AAAAAA" class="directive">
<tr><th><a href="directive-dict.html#Description">说明</a></th><td>Icon to display for files when no specific icon is
configured</td></tr>
<tr><th><a href="directive-dict.html#Syntax">语法</a></th><td><code>DefaultIcon <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">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>示例</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">指令</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 top
of the index listing</td></tr>
<tr><th><a href="directive-dict.html#Syntax">语法</a></th><td><code>HeaderName <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">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>

    <div class="example"><h3>示例</h3><p><code>
      HeaderName HEADER.html
    </code></p></div>

    <div class="note">
      <p>Both HeaderName and <code class="directive"><a href="#readmename">ReadmeName</a></code> now treat
      <var>Filename</var> as a URI path relative to the one used to
      access the directory 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>
        HeaderName /include/HEADER.html
      </code></p></div>
      
      <p><var>Filename</var> must resolve to a document with a major
      content type of <code>text/*</code> (例如,<code>text/html</code>, <code>text/plain</code>, etc.). This means
      that <var>filename</var> may refer to a CGI script if the script's
      actual file type (as opposed to its output) is marked as
      <code>text/html</code> such as with a directive like:</p>

      <div class="example"><p><code>
        AddType text/html .cgi

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -