📄 mod_mime.html.en
字号:
</span> </Files> </code></p></div> <p>This will cause <code>foo.gz</code> to be marked as being encoded with the gzip method, but <code>foo.gz.asc</code> as an unencoded plaintext file.</p> <div class="note"><h3>Note</h3> <p><code class="directive">RemoveEncoding</code> directives are processed <em>after</em> any <code class="directive"><a href="#addencoding">AddEncoding</a></code> directives, so it is possible they may undo the effects of the latter if both occur within the same directory configuration.</p> </div> <p>The <var>extension</var> argument is case-insensitive, and can be specified with or without a leading dot.</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="RemoveHandler" id="RemoveHandler">RemoveHandler</a> <a name="removehandler" id="removehandler">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Removes any handler associations for a set of fileextensions</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>RemoveHandler <var>extension</var> [<var>extension</var>]...</code></td></tr><tr><th><a href="directive-dict.html#Context">Context:</a></th><td>virtual host, directory, .htaccess</td></tr><tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</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_mime</td></tr></table> <p>The <code class="directive">RemoveHandler</code> directive removes any handler associations for files with the given extensions. This allows <code>.htaccess</code> files in subdirectories to undo any associations inherited from parent directories or the server config files. An example of its use might be:</p> <div class="example"><h3>/foo/.htaccess:</h3><p><code> AddHandler server-parsed .html </code></p></div> <div class="example"><h3>/foo/bar/.htaccess:</h3><p><code> RemoveHandler .html </code></p></div> <p>This has the effect of returning <code>.html</code> files in the <code>/foo/bar</code> directory to being treated as normal files, rather than as candidates for parsing (see the <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> module).</p> <p>The <var>extension</var> argument is case-insensitive, and can be specified with or without a leading dot.</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="RemoveInputFilter" id="RemoveInputFilter">RemoveInputFilter</a> <a name="removeinputfilter" id="removeinputfilter">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Removes any input filter associations for a set of fileextensions</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>RemoveInputFilter <var>extension</var> [<var>extension</var>]...</code></td></tr><tr><th><a href="directive-dict.html#Context">Context:</a></th><td>virtual host, directory, .htaccess</td></tr><tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</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_mime</td></tr><tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>RemoveInputFilter is only available in Apache 2.0.26 andlater.</td></tr></table> <p>The <code class="directive">RemoveInputFilter</code> directive removes any input <a href="../filter.html">filter</a> associations for files with the given extensions. This allows <code>.htaccess</code> files in subdirectories to undo any associations inherited from parent directories or the server config files.</p> <p>The <var>extension</var> argument is case-insensitive, and can be specified with or without a leading dot.</p><h3>See also</h3><ul><li><code class="directive"><a href="#addinputfilter">AddInputFilter</a></code></li><li><code class="directive"><a href="../mod/core.html#setinputfilter">SetInputFilter</a></code></li></ul></div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="directive-section"><h2><a name="RemoveLanguage" id="RemoveLanguage">RemoveLanguage</a> <a name="removelanguage" id="removelanguage">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Removes any language associations for a set of fileextensions</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>RemoveLanguage <var>extension</var> [<var>extension</var>]...</code></td></tr><tr><th><a href="directive-dict.html#Context">Context:</a></th><td>virtual host, directory, .htaccess</td></tr><tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</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_mime</td></tr><tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>RemoveLanguage is only available in Apache 2.0.24 andlater.</td></tr></table> <p>The <code class="directive">RemoveLanguage</code> directive removes any language associations for files with the given extensions. This allows <code>.htaccess</code> files in subdirectories to undo any associations inherited from parent directories or the server config files.</p> <p>The <var>extension</var> argument is case-insensitive, and can be specified with or without a leading dot.</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="RemoveOutputFilter" id="RemoveOutputFilter">RemoveOutputFilter</a> <a name="removeoutputfilter" id="removeoutputfilter">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Removes any output filter associations for a set of fileextensions</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>RemoveOutputFilter <var>extension</var> [<var>extension</var>]...</code></td></tr><tr><th><a href="directive-dict.html#Context">Context:</a></th><td>virtual host, directory, .htaccess</td></tr><tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</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_mime</td></tr><tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>RemoveOutputFilter is only available in Apache 2.0.26 andlater.</td></tr></table> <p>The <code class="directive">RemoveOutputFilter</code> directive removes any output <a href="../filter.html">filter</a> associations for files with the given extensions. This allows <code>.htaccess</code> files in subdirectories to undo any associations inherited from parent directories or the server config files.</p> <p>The <var>extension</var> argument is case-insensitive, and can be specified with or without a leading dot.</p> <div class="example"><h3>Example</h3><p><code> RemoveOutputFilter shtml </code></p></div><h3>See also</h3><ul><li><code class="directive"><a href="#addoutputfilter">AddOutputFilter</a></code></li></ul></div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="directive-section"><h2><a name="RemoveType" id="RemoveType">RemoveType</a> <a name="removetype" id="removetype">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Removes any content type associations for a set of fileextensions</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>RemoveType <var>extension</var> [<var>extension</var>]...</code></td></tr><tr><th><a href="directive-dict.html#Context">Context:</a></th><td>virtual host, directory, .htaccess</td></tr><tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</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_mime</td></tr></table> <p>The <code class="directive">RemoveType</code> directive removes any MIME type associations for files with the given extensions. This allows <code>.htaccess</code> files in subdirectories to undo any associations inherited from parent directories or the server config files. An example of its use might be:</p> <div class="example"><h3>/foo/.htaccess:</h3><p><code> RemoveType .cgi </code></p></div> <p>This will remove any special handling of <code>.cgi</code> files in the <code>/foo/</code> directory and any beneath it, causing the files to be treated as being of the <code class="directive"><a href="../mod/core.html#defaulttype">DefaultType</a></code>.</p> <div class="note"><h3>Note</h3> <p><code class="directive">RemoveType</code> directives are processed <em>after</em> any <code class="directive"><a href="#addtype">AddType</a></code> directives, so it is possible they may undo the effects of the latter if both occur within the same directory configuration.</p> </div> <p>The <var>extension</var> argument is case-insensitive, and can be specified with or without a leading dot.</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="TypesConfig" id="TypesConfig">TypesConfig</a> <a name="typesconfig" id="typesconfig">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The location of the <code>mime.types</code> file</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>TypesConfig <var>file-path</var></code></td></tr><tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>TypesConfig conf/mime.types</code></td></tr><tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</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_mime</td></tr></table> <p>The <code class="directive">TypesConfig</code> directive sets the location of the MIME types configuration file. <var>File-path</var> is relative to the <code class="directive"><a href="../mod/core.html#serverroot">ServerRoot</a></code>. This file sets the default list of mappings from filename extensions to content types. Most administrators use the provided <code>mime.types</code> file, which associates common filename extensions with IANA registered content types. The current list is maintained at <a href="http://www.iana.org/assignments/media-types/index.html">http://www.iana.org/assignments/media-types/index.html</a>. This simplifies the <code>httpd.conf</code> file by providing the majority of media-type definitions, and may be overridden by <code class="directive"><a href="#addtype">AddType</a></code> directives as needed. You should not edit the <code>mime.types</code> file, because it may be replaced when you upgrade your server.</p> <p>The file contains lines in the format of the arguments to an <code class="directive"><a href="#addtype">AddType</a></code> directive:</p> <div class="example"><p><code> <var>MIME-type</var> [<var>extension</var>] ... </code></p></div> <p>The case of the extension does not matter. Blank lines, and lines beginning with a hash character (<code>#</code>) are ignored.</p> <div class="note"> Please do <strong>not</strong> send requests to the Apache HTTP Server Project to add any new entries in the distributed <code>mime.types</code> file unless (1) they are already registered with IANA, and (2) they use widely accepted, non-conflicting filename extensions across platforms. <code>category/x-subtype</code> requests will be automatically rejected, as will any new two-letter extensions as they will likely conflict later with the already crowded language and character set namespace. </div><h3>See also</h3><ul><li><code class="module"><a href="../mod/mod_mime_magic.html">mod_mime_magic</a></code></li></ul></div></div><div class="bottomlang"><p><span>Available Languages: </span><a href="../en/mod/mod_mime.html" title="English"> en </a> |<a href="../ja/mod/mod_mime.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a></p></div><div id="footer"><p class="apache">Copyright 2007 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 + -