mod_mime.html revision 75569f53579b42dc17cf097015b6b055c01e6875
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
This file is generated from xml source: DO NOT EDIT
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
--><title>mod_mime - Apache HTTP Server</title><link rel="stylesheet" type="text/css" href="/style/manual.css"/></head><body><blockquote><div align="center"><img src="/images/sub.gif" alt="[APACHE DOCUMENTATION]"/><h3>Apache HTTP Server Version 2.0</h3></div><h1 align="center">Apache Module mod_mime</h1><table bgcolor="#cccccc" cellpadding="0" cellspacing="1"><tr><td><table bgcolor="#ffffff"><tr><td valign="top"><span class="help">Description:</span></td><td>Associates the requested filename's extensions
with the file's behavior (handlers and filters)
and content (mime-type, language, character set and
encoding)</td></tr><tr><td><a class="help" href="module-dict.html#Status">Status:</a></td><td>Base</td></tr><tr><td><a class="help" href="module-dict.html#ModuleIdentifier">Module Identifier:</a></td><td>mime_module</td></tr></table></td></tr></table><h2>Summary</h2>
<p>This module is used to associate various bits of "meta
information" with files by their filename extensions. This
information relates the filename of the document to it's
mime-type, language, character set and encoding. This
information is sent to the browser, and participates in content
negotiation, so the user's preferences are respected when
choosing one of several possible files to serve. See
about content negotiation. </p>
<p>The directives <a class="directive" href="#addcharset"><code class="directive">AddCharset</code></a>, <a class="directive" href="#addencoding"><code class="directive">AddEncoding</code></a>, <a class="directive" href="#addlanguage"><code class="directive">AddLanguage</code></a> and <a class="directive" href="#addtype"><code class="directive">AddType</code></a> are all used to map file
extensions onto the meta-information for that file. Respectively
they set the character set, content-encoding, content-language,
and MIME-type (content-type) of documents.</p>
for a document, which controls what module or script will serve
the document. With the introduction of "filters" in Apache 2.0,
content should be processed through (e.g. the Includes output
filter for server side scripting) and what filters the client
request and POST content should be processed through (the input
filters.)</p>
<p>The directives <a class="directive" href="#addhandler"><code class="directive">AddHandler</code></a>, <a class="directive" href="#addoutputfilter"><code class="directive">AddOutputFilter</code></a>, and <a class="directive" href="#addinputfilter"><code class="directive">AddInputFilter</code></a> control the modules
or scripts that serve the document. The <a class="directive" href="#multiviewsmatch"><code class="directive">MultiviewsMatch</code></a> directive allows
to included when testing Multiviews matches.</p>
<p>The directive <a class="directive" href="#typesconfig"><code class="directive">TypesConfig</code></a> is used to specify a
file which also maps extensions onto MIME types. Most
administrators use the provided mime.types file which associates
common filename extensions with IANA registered content types. The
current list is maintained at
majority of media-type definitions, and they may be overridden by
<a class="directive" href="#addtype"><code class="directive">AddType</code></a> directives as
needed.</p>
<blockquote><table><tr><td bgcolor="#e0e5f5">Please do not send requests to the Apache httpd Project
to add any new entries in the distributed mime.types file
unless (1) they are already registered with IANA, and (2) they
use widely accepted, non-conflicting filename extensions across
rejected, as will any new two-letter extensions as they will
likely conflict later with the already crowded language and
character set namespace.</td></tr></table></blockquote>
<p>The core directives <a class="directive" href="core.html#forcetype"><code class="directive">ForceType</code></a> and <a class="directive" href="core.html#sethandler"><code class="directive">SetHandler</code></a> are used to associate all the
files in a given container (<em>e.g.</em>, <a class="directive" href="core.html#location"><code class="directive"><location></code></a>, <a class="directive" href="core.html#director"><code class="directive"><director></code></a>, or <a class="directive" href="core.html#files"><code class="directive"><Files></code></a>) with a particular
MIME-type or handler. These settings override any filename
<p>Note that changing the meta-information for a file does not
change the value of the <code>Last-Modified</code> header.
Thus, previously cached copies may still be used by a client or
proxy, with the previous headers. If you change the
meta-information (language, content type, character set or
encoding) you may need to 'touch' affected files (updating
their last modified date) to ensure that all visitors are
receive the corrected content headers.</p>
<h2>Directives</h2><ul><li><a href="#addcharset">AddCharset</a></li><li><a href="#addencoding">AddEncoding</a></li><li><a href="#addhandler">AddHandler</a></li><li><a href="#addinputfilter">AddInputFilter</a></li><li><a href="#addlanguage">AddLanguage</a></li><li><a href="#addoutputfilter">AddOutputFilter</a></li><li><a href="#addtype">AddType</a></li><li><a href="#defaultlanguage">DefaultLanguage</a></li><li><a href="#multiviewsmatch">MultiviewsMatch</a></li><li><a href="#removecharset">RemoveCharset</a></li><li><a href="#removeencoding">RemoveEncoding</a></li><li><a href="#removehandler">RemoveHandler</a></li><li><a href="#removeinputfilter">RemoveInputFilter</a></li><li><a href="#removelanguage">RemoveLanguage</a></li><li><a href="#removeoutputfilter">RemoveOutputFilter</a></li><li><a href="#removetype">RemoveType</a></li><li><a href="#typesconfig">TypesConfig</a></li></ul><p><strong>See also </strong></p><ul><li><a class="directive" href="mod_mime_magic.html#mimemagicfile"><code class="directive">MimeMagicFile</code></a></li><li><a class="directive" href="core.html#defaulttype"><code class="directive">DefaultType</code></a></li><li><a class="directive" href="core.html#adddefaultcharset"><code class="directive">AddDefaultCharset</code></a></li><li><a class="directive" href="core.html#sethandler"><code class="directive">SetHandler</code></a></li><li><a class="directive" href="core.html#setinputfilter"><code class="directive">SetInputFilter</code></a></li><li><a class="directive" href="core.html#setoutputfilter"><code class="directive">SetOutputFilter</code></a></li></ul><h2><a name="multipleext">Files with Multiple Extensions</a></h2>
<p>Files can have more than one extension, and the order of the
extensions is <em>normally</em> irrelevant. For example, if the
will map onto exactly the same information. If more than one
extension is given which maps onto the same
type of meta-information, then the one to the right will be
<p>Care should be taken when a file with multiple extensions
gets associated with both a MIME-type and a handler. This will
usually result in the request being by the module associated
with the handler. For example, if the <code>.imap</code>
extension is mapped to the handler "imap-file" (from mod_imap)
and the <code>.html</code> extension is mapped to the MIME-type
MIME-type. When it is processed, the "imap-file" handler will
be used, and so it will be treated as a mod_imap imagemap
file.</p>
<h2><a name="contentencoding">Content encoding</a></h2>
<p>A file of a particular MIME type can additionally be encoded a
particular way to simplify transmission over the Internet.
While this usually will refer to compression, such as
<code>gzip</code>, it can also refer to encryption, such a
<code>pgp</code> or to an encoding such as UUencoding, which is
designed for transmitting a binary file in an ASCII (text)
format.</p>
<p>The MIME RFC puts it this way:</p>
<blockquote><table><tr><td bgcolor="#e0e5f5">
The Content-Encoding entity-header field is used as a
modifier to the media-type. When present, its value indicates
what additional content coding has been applied to the
resource, and thus what decoding mechanism must be applied in
order to obtain the media-type referenced by the Content-Type
header field. The Content-Encoding is primarily used to allow
a document to be compressed without losing the identity of
its underlying media type.
</td></tr></table></blockquote>
<p>By using more than one file extension (see <a href="#multipleext">section above about multiple file
extensions</a>), you can indicate that a file is of a
particular <em>type</em>, and also has a particular
<em>encoding</em>. </p>
<p>For example, you may have a file which is a Microsoft Word
document, which is pkzipped to reduce its size. If the
<code>.doc</code> extension is associated with the Microsoft
Word file type, and the <code>.zip</code> extension is
associated with the pkzip file encoding, then the file
document.</p>
<p>Apache send a <code>Content-encoding</code> header with the
resource, in order to tell the client browser about the
encoding method.</p>
<blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>Content-encoding: pkzip</code></td></tr></table></blockquote>
<h2>Character sets and languages</h2>
<p>In addition to file type and the file encoding,
another important piece of information is what language a
particular document is in, and in what character set the file
should be displayed. For example, the document might be written
in the Vietnamese alphabet, or in Cyrillic, and should be
displayed as such. This information, also, is transmitted in
HTTP headers.</p>
<p>The character set, language encoding and mime type are all
used in the process of content negotiation (See
which document to give to the client, when there are
alternative documents in more than one character set, language,
encoding or mime type. All filename extensions associations
created with <code><a href="AddCharset.html">AddCharset</a></code>, <code><a href="AddEncoding.html">AddEncoding</a></code>,
<code><a href="AddLanguage.html">AddLanguage</a></code> and <code><a href="AddType.html">AddType</a></code> directives
participate in this select process. Filename extensions that
<code><a href="AddInputFilter.html">AddInputFilter</a></code> or <code><a href="AddOutputFilter.html">AddOutputFilter</a></code>
directives may be included or excluded from matching by using
the <code class="directive">MultiviewsMatch</code> directive.</p>
<h3>Charset</h3>
<p>To convey this further information, Apache optionally sends
a <code>Content-Language</code> header, to specify the language
that the document is in, and can append additional information
onto the <code>Content-Type</code> header to indicate the
particular character set that should be used to correctly
render the information.</p>
<blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
Content-Language: en, fr<br/>
</code></td></tr></table></blockquote>
<p>The language specification is the two-letter abbreviation
for the language. The <code>charset</code> is the name of the
particular character set which should be used.</p>
<hr/><h2><a name="AddCharset">AddCharset</a> <a name="addcharset">Directive</a></h2><table bgcolor="#cccccc" border="0" cellspacing="0" cellpadding="1"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Maps the given filename extensions
to the specified content charset</td></tr><tr><td><a class="help" href="directive-dict.html#Syntax">Syntax:</a></td><td>AddCharset <em>charset extension</em>
[<em>extension</em>] ...</td></tr><tr><td><a class="help" href="directive-dict.html#Context">Context:</a></td><td>server config, virtual host, directory, .htaccess</td></tr><tr><td><a class="help" href="directive-dict.html#Override">Override:</a></td><td>FileInfo</td></tr><tr><td><a class="help" href="directive-dict.html#Status">Status:</a></td><td>Base</td></tr><tr><td><a class="help" href="directive-dict.html#Module">Module:</a></td><td>mod_mime</td></tr><tr><td valign="top" align="left"><a class="help" href="directive-dict.html#Compatibility">Compatibility:</a></td><td>AddCharset is only available in Apache
1.3.10 and later</td></tr></table></td></tr></table>
<p>The AddCharset directive maps the given filename extensions
to the specified content charset. <em>charset</em> is the MIME
charset parameter of filenames containing <em>extension</em>.
This mapping is added to any already in force, overriding any
mappings that already exist for the same <em>extension</em>.</p>
<p>Example:</p>
<blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
AddLanguage ja .ja<br/>
AddCharset EUC-JP .euc<br/>
AddCharset ISO-2022-JP .jis<br/>
AddCharset SHIFT_JIS .sjis
</code></td></tr></table></blockquote>
as being a Japanese document whose charset is ISO-2022-JP (as
directive is useful for both to inform the client about the
character encoding of the document so that the document can be
interpreted and displayed appropriately, and for <a href="/content-negotiation.html">content negotiation</a>,
where the server returns one from several documents based on
the client's charset preference.</p>
<p>The <em>extension</em> argument is case-insensitive, and can
be specified with or without a leading dot.</p>
<p><strong>See also </strong></p><ul><li><code><a href="mod_negotiation.html">mod_negotiation</a></code></li><li><a class="directive" href="core.html#adddefaultcharset"><code class="directive">AddDefaultCharset</code></a></li></ul><hr/><h2><a name="AddEncoding">AddEncoding</a> <a name="addencoding">Directive</a></h2><table bgcolor="#cccccc" border="0" cellspacing="0" cellpadding="1"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Maps the given filename extensions
to the specified encoding type</td></tr><tr><td><a class="help" href="directive-dict.html#Syntax">Syntax:</a></td><td>AddEncoding
<em>MIME-enc extension</em> [<em>extension</em>] ...</td></tr><tr><td><a class="help" href="directive-dict.html#Context">Context:</a></td><td>server config, virtual host, directory, .htaccess</td></tr><tr><td><a class="help" href="directive-dict.html#Override">Override:</a></td><td>FileInfo</td></tr><tr><td><a class="help" href="directive-dict.html#Status">Status:</a></td><td>Base</td></tr><tr><td><a class="help" href="directive-dict.html#Module">Module:</a></td><td>mod_mime</td></tr></table></td></tr></table>
<p>The AddEncoding directive maps the given filename extensions
to the specified encoding type. <em>MIME-enc</em> is the MIME
encoding to use for documents containing the
<em>extension</em>. This mapping is added to any already in
force, overriding any mappings that already exist for the same
<em>extension</em>. Example:</p>
<blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
AddEncoding x-gzip .gz<br/>
AddEncoding x-compress .Z
</code></td></tr></table></blockquote>
<p>This will cause filenames containing the .gz extension to be
marked as encoded using the x-gzip encoding, and filenames
containing the .Z extension to be marked as encoded with
x-compress. </p>
<p>Old clients expect <code>x-gzip</code> and
<code>x-compress</code>, however the standard dictates that
they're equivalent to <code>gzip</code> and
<code>compress</code> respectively. Apache does content
encoding comparisons by ignoring any leading <code>x-</code>.
When responding with an encoding Apache will use whatever form
client requested. If the client didn't specifically request a
particular form Apache will use the form given by the
<code>AddEncoding</code> directive. To make this long story
short, you should always use <code>x-gzip</code> and
<code>x-compress</code> for these two specific encodings. More
recent encodings, such as <code>deflate</code> should be
specified without the <code>x-</code>.</p>
<p>The <em>extension</em> argument is case-insensitive, and can
be specified with or without a leading dot.</p>
<p><strong>See also </strong></p><ul><li><a href="#multipleext">Files with
multiple extensions</a></li></ul><hr/><h2><a name="AddHandler">AddHandler</a> <a name="addhandler">Directive</a></h2><table bgcolor="#cccccc" border="0" cellspacing="0" cellpadding="1"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Maps the filename extensions
to the specified handler</td></tr><tr><td><a class="help" href="directive-dict.html#Syntax">Syntax:</a></td><td>AddHandler
<em>handler-name extension</em> [<em>extension</em>] ...</td></tr><tr><td><a class="help" href="directive-dict.html#Context">Context:</a></td><td>server config, virtual host, directory, .htaccess</td></tr><tr><td><a class="help" href="directive-dict.html#Override">Override:</a></td><td>FileInfo</td></tr><tr><td><a class="help" href="directive-dict.html#Status">Status:</a></td><td>Base</td></tr><tr><td><a class="help" href="directive-dict.html#Module">Module:</a></td><td>mod_mime</td></tr><tr><td valign="top" align="left"><a class="help" href="directive-dict.html#Compatibility">Compatibility:</a></td><td/></tr></table></td></tr></table>
<p>This mapping is added to any already in
force, overriding any mappings that already exist for the same
<em>extension</em>. For example, to activate CGI scripts with
the file extension "<code>.cgi</code>", you might use:</p>
<blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
AddHandler cgi-script .cgi
</code></td></tr></table></blockquote>
file, any file containing the "<code>.cgi</code>" extension
will be treated as a CGI program.</p>
<p>The <em>extension</em> argument is case-insensitive, and can
be specified with or without a leading dot.</p>
<p><strong>See also </strong></p><ul><li><a href="#multipleext">Files with
multiple extensions</a></li><li><a href="/handler.html">Handlers</a></li><li><a class="directive" href="core.html#sethandler"><code class="directive">SetHandler</code></a></li></ul><hr/><h2><a name="AddInputFilter">AddInputFilter</a> <a name="addinputfilter">Directive</a></h2><table bgcolor="#cccccc" border="0" cellspacing="0" cellpadding="1"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Maps filename extensions
to the filters that will process
client requests</td></tr><tr><td><a class="help" href="directive-dict.html#Syntax">Syntax:</a></td><td>AddInputFilter
<em>filter</em>[<em>;filter</em>...] extension
[<em>extension</em> ...]</td></tr><tr><td><a class="help" href="directive-dict.html#Context">Context:</a></td><td>server config, virtual host, directory, .htaccess</td></tr><tr><td><a class="help" href="directive-dict.html#Status">Status:</a></td><td>Base</td></tr><tr><td><a class="help" href="directive-dict.html#Module">Module:</a></td><td>mod_mime</td></tr><tr><td valign="top" align="left"><a class="help" href="directive-dict.html#Compatibility">Compatibility:</a></td><td>AddInputFilter
is only available in Apache 2.0.26 and later.</td></tr></table></td></tr></table>
<p>AddInputFilter maps the filename extensions
<em>extension</em> to the filter or filters which will process
client requests and POST input when they are received by the
server. This is in addition to any filters defined elsewhere,
This mapping is merged over any already in force, overriding
any mappings that already exist for the same
<em>extension</em>.</p>
<p>If more than one filter is specified, they must be separated
by semicolons in the order in which they should process the
content. Both the filter and <em>extension</em> arguments are
case-insensitive, and the extension may be specified with or
without a leading dot.</p>
documentation.</li><li><a class="directive" href="core.html#setinputfilter"><code class="directive">SetInputFilter</code></a></li></ul><hr/><h2><a name="AddLanguage">AddLanguage</a> <a name="addlanguage">Directive</a></h2><table bgcolor="#cccccc" border="0" cellspacing="0" cellpadding="1"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Maps the given filename extension
to the specified content language</td></tr><tr><td><a class="help" href="directive-dict.html#Syntax">Syntax:</a></td><td>AddLanguage
<em>MIME-lang extension</em> [<em>extension</em>] ...</td></tr><tr><td><a class="help" href="directive-dict.html#Context">Context:</a></td><td>server config, virtual host, directory, .htaccess</td></tr><tr><td><a class="help" href="directive-dict.html#Override">Override:</a></td><td>FileInfo</td></tr><tr><td><a class="help" href="directive-dict.html#Status">Status:</a></td><td>Base</td></tr><tr><td><a class="help" href="directive-dict.html#Module">Module:</a></td><td>mod_mime</td></tr></table></td></tr></table>
<p>The AddLanguage directive maps the given filename extension
to the specified content language. <em>MIME-lang</em> is the
MIME language of filenames containing <em>extension</em>. This
mapping is added to any already in force, overriding any
mappings that already exist for the same
<em>extension</em>.</p>
<p>Example:</p>
<blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
AddEncoding x-compress .Z<br/>
AddLanguage en .en<br/>
AddLanguage fr .fr
</code></td></tr></table></blockquote>
being a compressed English document (as will the document
reported to the client, the browser is unlikely to use this
information. The AddLanguage directive is more useful for <a href="/content-negotiation.html">content negotiation</a>,
where the server returns one from several documents based on
the client's language preference.</p>
<p>If multiple language assignments are made for the same
extension, the last one encountered is the one that is used.
That is, for the case of:</p>
<blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
AddLanguage en .en<br/>
AddLanguage en-uk .en<br/>
AddLanguage en-us .en
</code></td></tr></table></blockquote>
<p>documents with the extension "<code>.en</code>" would be
treated as being "<code>en-us</code>".</p>
<p>The <em>extension</em> argument is case-insensitive, and can
be specified with or without a leading dot.</p>
<p><strong>See also </strong></p><ul><li><a href="#multipleext">Files with
multiple extensions</a></li><li><code><a href="mod_negotiation.html">mod_negotiation</a></code></li></ul><hr/><h2><a name="AddOutputFilter">AddOutputFilter</a> <a name="addoutputfilter">Directive</a></h2><table bgcolor="#cccccc" border="0" cellspacing="0" cellpadding="1"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>maps the filename
extensions to the filters that will process
responses from the server</td></tr><tr><td><a class="help" href="directive-dict.html#Syntax">Syntax:</a></td><td>AddOutputFilter
<em>filter</em>[<em>;filter</em>...] extension
[<em>extension</em> ...]</td></tr><tr><td><a class="help" href="directive-dict.html#Context">Context:</a></td><td>server config, virtual host, directory, .htaccess</td></tr><tr><td><a class="help" href="directive-dict.html#Override">Override:</a></td><td/></tr><tr><td><a class="help" href="directive-dict.html#Status">Status:</a></td><td>Base</td></tr><tr><td><a class="help" href="directive-dict.html#Module">Module:</a></td><td>mod_mime</td></tr><tr><td valign="top" align="left"><a class="help" href="directive-dict.html#Compatibility">Compatibility:</a></td><td>AddOutputFilter
is only available in Apache 2.0.26 and later.</td></tr></table></td></tr></table>
<p>The <code class="directive">AddOutputFilter</code> directive maps the filename
extensions <em>extension</em> to the filters which will process
responses from the server before they are sent to the client.
This is in addition to any filters defined elsewhere, including
the <a class="directive" href="core.html#setoutputfilter"><code class="directive">SetOutputFilter</code></a>
directive. This mapping is merged over any already in force,
overriding any mappings that already exist for the same
<em>extension</em>.</p>
<p>For example, the following configuration will process all
.shtml files for server-side includes.</p>
<blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
AddOutputFilter INCLUDES shtml
</code></td></tr></table></blockquote>
<p>If more than one filter is specified, they must be separated
by semicolons in the order in which they should process the
content. Both the filter and <em>extension</em> arguments are
case-insensitive, and the extension may be specified with or
without a leading dot.</p>
<p><strong>See also </strong></p><ul><li><a href="/filter.html">Filters</a> documentation</li><li><a class="directive" href="core.html#setoutputfilter"><code class="directive">SetOutputFilter</code></a></li></ul><hr/><h2><a name="AddType">AddType</a> <a name="addtype">Directive</a></h2><table bgcolor="#cccccc" border="0" cellspacing="0" cellpadding="1"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Maps the given filename extensions
onto the specified content type</td></tr><tr><td><a class="help" href="directive-dict.html#Syntax">Syntax:</a></td><td>AddType <em>MIME-type
extension</em> [<em>extension</em>] ...</td></tr><tr><td><a class="help" href="directive-dict.html#Context">Context:</a></td><td>server config, virtual host, directory, .htaccess</td></tr><tr><td><a class="help" href="directive-dict.html#Override">Override:</a></td><td>FileInfo</td></tr><tr><td><a class="help" href="directive-dict.html#Status">Status:</a></td><td>Base</td></tr><tr><td><a class="help" href="directive-dict.html#Module">Module:</a></td><td>mod_mime</td></tr></table></td></tr></table>
<p>The AddType directive maps the given filename extensions
onto the specified content type. <em>MIME-type</em> is the MIME
type to use for filenames containing <em>extension</em>. This
mapping is added to any already in force, overriding any
mappings that already exist for the same <em>extension</em>.
This directive can be used to add mappings not listed in the
MIME types file (see the <code class="directive">TypesConfig</code>
directive).</p>
<p>Example:</p>
<blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
</code></td></tr></table></blockquote>
<blockquote><table><tr><td bgcolor="#e0e5f5">It is recommended that new MIME types be added using the
AddType directive rather than changing the
<code class="directive">TypesConfig</code> file. </td></tr></table></blockquote>
<blockquote><table><tr><td bgcolor="#e0e5f5">Note that, unlike the NCSA httpd, this directive cannot be
used to set the type of particular files.</td></tr></table></blockquote>
<p>The <em>extension</em> argument is case-insensitive, and can
be specified with or without a leading dot.</p>
<p><strong>See also </strong></p><ul><li><a href="#multipleext">Files with
multiple extensions</a></li><li><a class="directive" href="core.html#defaulttype"><code class="directive">DefaultType</code></a></li></ul><hr/><h2><a name="DefaultLanguage">DefaultLanguage</a> <a name="defaultlanguage">Directive</a></h2><table bgcolor="#cccccc" border="0" cellspacing="0" cellpadding="1"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Sets all files in the given scope to the
specified language</td></tr><tr><td><a class="help" href="directive-dict.html#Syntax">Syntax:</a></td><td>DefaultLanguage
<em>MIME-lang</em></td></tr><tr><td><a class="help" href="directive-dict.html#Context">Context:</a></td><td>server config, virtual host, directory, .htaccess</td></tr><tr><td><a class="help" href="directive-dict.html#Override">Override:</a></td><td>FileInfo</td></tr><tr><td><a class="help" href="directive-dict.html#Status">Status:</a></td><td>Base</td></tr><tr><td><a class="help" href="directive-dict.html#Module">Module:</a></td><td>mod_mime</td></tr><tr><td valign="top" align="left"><a class="help" href="directive-dict.html#Compatibility">Compatibility:</a></td><td>DefaultLanguage
is only available in Apache 1.3.4 and later.</td></tr></table></td></tr></table>
<p>The DefaultLanguage directive tells Apache that all files in
current <code><Directory></code> container) that don't
have an explicit language extension (such as <code>.fr</code>
or <code>.de</code> as configured by <code>AddLanguage</code>)
should be considered to be in the specified <em>MIME-lang</em>
language. This allows entire directories to be marked as
containing Dutch content, for instance, without having to
rename each file. Note that unlike using extensions to specify
languages, <code>DefaultLanguage</code> can only specify a
single language.</p>
<p>If no <code>DefaultLanguage</code> directive is in force,
and a file does not have any language extensions as configured
by <code>AddLanguage</code>, then that file will be considered
to have no language attribute.</p>
<p><strong>See also </strong></p><ul><li><a href="#multipleext">Files with
multiple extensions</a></li><li><code><a href="mod_negotiation.html">mod_negotiation</a></code></li></ul><hr/><h2><a name="MultiviewsMatch">MultiviewsMatch</a> <a name="multiviewsmatch">Directive</a></h2><table bgcolor="#cccccc" border="0" cellspacing="0" cellpadding="1"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>The types of files that will be included when
searching for a matching file with MultiViews</td></tr><tr><td><a class="help" href="directive-dict.html#Syntax">Syntax:</a></td><td>MultiviewsMatch
<em>[NegotiatedOnly] [Handlers] [Filters] [Any]</em></td></tr><tr><td><a class="help" href="directive-dict.html#Context">Context:</a></td><td>server config, virtual host, directory, .htaccess</td></tr><tr><td><a class="help" href="directive-dict.html#Override">Override:</a></td><td>FileInfo</td></tr><tr><td><a class="help" href="directive-dict.html#Status">Status:</a></td><td>Base</td></tr><tr><td><a class="help" href="directive-dict.html#Module">Module:</a></td><td>mod_mime</td></tr><tr><td valign="top" align="left"><a class="help" href="directive-dict.html#Compatibility">Compatibility:</a></td><td>Available
in Apache 2.0.26 and later.</td></tr></table></td></tr></table>
<p>MultiviewsMatch permits three different behaviors for
feature. Multiviews allows a request for a file, e.g. index.html,
to match any negotiated extensions following the base request,
<p>The NegotiatedOnly option provides that every extension following
the base name must correlate to a recognized mod_mime extension for
content negotation, e.g. Charset, Content-Type, Language, or
Encoding. This is the strictest implementation with the fewest
unexpected side effects, and is the default behavior.</p>
set the MultiviewsMatch directive to either Handlers, Filters, or
both option keywords. If all other factors are equal, the smallest
file will be served, e.g. in deciding between index.html.cgi of 500
characters and index.html.pl of 1000 bytes, the .cgi file would win
in this example. Users of .asis files might prefer to use the
Handler option, if .asis files are associated with the asis-handler.</p>
<p>You may finally allow Any extensions to match, even if mod_mime
doesn't recognize the extension. This was the behavior in Apache 1.3,
and can cause unpredicatable results, such as serving .old or .bak
files the webmaster never expected to be served.</p>
<p><strong>See also </strong></p><ul><li><code><a href="mod_negotiation.html">mod_negotiation</a></code></li><li><a class="directive" href="core.html#options"><code class="directive">Options</code></a></li></ul><hr/><h2><a name="RemoveCharset">RemoveCharset</a> <a name="removecharset">Directive</a></h2><table bgcolor="#cccccc" border="0" cellspacing="0" cellpadding="1"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Removes any character set associations for a set of file
extensions</td></tr><tr><td><a class="help" href="directive-dict.html#Syntax">Syntax:</a></td><td>RemoveCharset
<em>extension</em> [<em>extension</em>] ...</td></tr><tr><td><a class="help" href="directive-dict.html#Context">Context:</a></td><td>directory, .htaccess</td></tr><tr><td><a class="help" href="directive-dict.html#Status">Status:</a></td><td>Base</td></tr><tr><td><a class="help" href="directive-dict.html#Module">Module:</a></td><td>mod_mime</td></tr><tr><td valign="top" align="left"><a class="help" href="directive-dict.html#Compatibility">Compatibility:</a></td><td>RemoveCharset is
only available in Apache 2.0.24 and later.</td></tr></table></td></tr></table>
<p>The <code>RemoveCharset</code> directive removes any
character set 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 <em>extension</em> argument is case-insensitive, and can
be specified with or without a leading dot.</p>
<hr/><h2><a name="RemoveEncoding">RemoveEncoding</a> <a name="removeencoding">Directive</a></h2><table bgcolor="#cccccc" border="0" cellspacing="0" cellpadding="1"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Removes any content encoding associations for a set of file
extensions</td></tr><tr><td><a class="help" href="directive-dict.html#Syntax">Syntax:</a></td><td>RemoveEncoding
<em>extension</em> [<em>extension</em>] ...</td></tr><tr><td><a class="help" href="directive-dict.html#Context">Context:</a></td><td>directory, .htaccess</td></tr><tr><td><a class="help" href="directive-dict.html#Status">Status:</a></td><td>Base</td></tr><tr><td><a class="help" href="directive-dict.html#Module">Module:</a></td><td>mod_mime</td></tr><tr><td valign="top" align="left"><a class="help" href="directive-dict.html#Compatibility">Compatibility:</a></td><td>RemoveEncoding
is only available in Apache 1.3.13 and later.</td></tr></table></td></tr></table>
<p>The <code>RemoveEncoding</code> directive removes any
encoding 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>
<blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
<dl>
<dd><code>AddEncoding x-gzip .gz</code><br/>
<code> RemoveEncoding
.gz</code><br/>
<code></Files></code></dd>
</dl>
</code></td></tr></table></blockquote>
unencoded plaintext file.</p>
<p><strong>Note:</strong>RemoveEncoding directives are processed
<em>after</em> any AddEncoding directives, so it is possible they
may undo the effects of the latter if both occur within the
same directory configuration.</p>
<p>The <em>extension</em> argument is case-insensitive, and can
be specified with or without a leading dot.</p>
<hr/><h2><a name="RemoveHandler">RemoveHandler</a> <a name="removehandler">Directive</a></h2><table bgcolor="#cccccc" border="0" cellspacing="0" cellpadding="1"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Removes any handler associations for a set of file
extensions</td></tr><tr><td><a class="help" href="directive-dict.html#Syntax">Syntax:</a></td><td>RemoveHandler
<em>extension</em> [<em>extension</em>] ...</td></tr><tr><td><a class="help" href="directive-dict.html#Context">Context:</a></td><td>directory, .htaccess</td></tr><tr><td><a class="help" href="directive-dict.html#Status">Status:</a></td><td>Base</td></tr><tr><td><a class="help" href="directive-dict.html#Module">Module:</a></td><td>mod_mime</td></tr><tr><td valign="top" align="left"><a class="help" href="directive-dict.html#Compatibility">Compatibility:</a></td><td>RemoveHandler is
only available in Apache 1.3.4 and later.</td></tr></table></td></tr></table>
<p>The <code>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>
<blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
<dl>
<dd><code>AddHandler server-parsed .html</code></dd>
<dd><code>RemoveHandler .html</code></dd>
</dl>
</code></td></tr></table></blockquote>
<p>This has the effect of returning <code>.html</code> files in
files, rather than as candidates for parsing (see the <a href="mod_include.html"><code>mod_include</code></a>
module).</p>
<p>The <em>extension</em> argument is case-insensitive, and can
be specified with or without a leading dot.</p>
<hr/><h2><a name="RemoveInputFilter">RemoveInputFilter</a> <a name="removeinputfilter">Directive</a></h2><table bgcolor="#cccccc" border="0" cellspacing="0" cellpadding="1"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Removes any input filter associations for a set of file
extensions</td></tr><tr><td><a class="help" href="directive-dict.html#Syntax">Syntax:</a></td><td>RemoveInputFilter
<em>extension</em> [<em>extension</em>] ...</td></tr><tr><td><a class="help" href="directive-dict.html#Context">Context:</a></td><td>directory, .htaccess</td></tr><tr><td><a class="help" href="directive-dict.html#Status">Status:</a></td><td>Base</td></tr><tr><td><a class="help" href="directive-dict.html#Module">Module:</a></td><td>mod_mime</td></tr><tr><td valign="top" align="left"><a class="help" href="directive-dict.html#Compatibility">Compatibility:</a></td><td>RemoveInputFilter is only available in Apache
2.0.26 and later.</td></tr></table></td></tr></table>
<p>The <code>RemoveInputFilter</code> directive removes any
input filter 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 <em>extension</em> argument is case-insensitive, and can
be specified with or without a leading dot.</p>
<hr/><h2><a name="RemoveLanguage">RemoveLanguage</a> <a name="removelanguage">Directive</a></h2><table bgcolor="#cccccc" border="0" cellspacing="0" cellpadding="1"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Removes any language associations for a set of file
extensions</td></tr><tr><td><a class="help" href="directive-dict.html#Syntax">Syntax:</a></td><td>RemoveLanguage
<em>extension</em> [<em>extension</em>] ...</td></tr><tr><td><a class="help" href="directive-dict.html#Context">Context:</a></td><td>directory, .htaccess</td></tr><tr><td><a class="help" href="directive-dict.html#Status">Status:</a></td><td>Base</td></tr><tr><td><a class="help" href="directive-dict.html#Module">Module:</a></td><td>mod_mime</td></tr><tr><td valign="top" align="left"><a class="help" href="directive-dict.html#Compatibility">Compatibility:</a></td><td>RemoveLanguage
is only available in Apache 2.0.24 and later.</td></tr></table></td></tr></table>
<p>The <code>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 <em>extension</em> argument is case-insensitive, and can
be specified with or without a leading dot.</p>
<hr/><h2><a name="RemoveOutputFilter">RemoveOutputFilter</a> <a name="removeoutputfilter">Directive</a></h2><table bgcolor="#cccccc" border="0" cellspacing="0" cellpadding="1"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Removes any output filter associations for a set of file
extensions</td></tr><tr><td><a class="help" href="directive-dict.html#Syntax">Syntax:</a></td><td>RemoveOutputFilter
<em>extension</em> [<em>extension</em>] ...</td></tr><tr><td><a class="help" href="directive-dict.html#Context">Context:</a></td><td>directory, .htaccess</td></tr><tr><td><a class="help" href="directive-dict.html#Override">Override:</a></td><td/></tr><tr><td><a class="help" href="directive-dict.html#Status">Status:</a></td><td>Base</td></tr><tr><td><a class="help" href="directive-dict.html#Module">Module:</a></td><td>mod_mime</td></tr><tr><td valign="top" align="left"><a class="help" href="directive-dict.html#Compatibility">Compatibility:</a></td><td>RemoveOutputFilter is only available in Apache
2.0.26 and later.</td></tr></table></td></tr></table>
<p>The <code>RemoveOutputFilter</code> directive removes any
output filter 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 <em>extension</em> argument is case-insensitive, and can
be specified with or without a leading dot.</p>
<hr/><h2><a name="RemoveType">RemoveType</a> <a name="removetype">Directive</a></h2><table bgcolor="#cccccc" border="0" cellspacing="0" cellpadding="1"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Removes any content type associations for a set of file
extensions</td></tr><tr><td><a class="help" href="directive-dict.html#Syntax">Syntax:</a></td><td>RemoveType
<em>extension</em> [<em>extension</em>] ...</td></tr><tr><td><a class="help" href="directive-dict.html#Context">Context:</a></td><td>directory, .htaccess</td></tr><tr><td><a class="help" href="directive-dict.html#Override">Override:</a></td><td/></tr><tr><td><a class="help" href="directive-dict.html#Status">Status:</a></td><td>Base</td></tr><tr><td><a class="help" href="directive-dict.html#Module">Module:</a></td><td>mod_mime</td></tr><tr><td valign="top" align="left"><a class="help" href="directive-dict.html#Compatibility">Compatibility:</a></td><td>RemoveType is
only available in Apache 1.3.13 and later.</td></tr></table></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>
<blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
<dl>
<dd><code>RemoveType .cgi</code></dd>
</dl>
</code></td></tr></table></blockquote>
<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 <a href="core.html#defaulttype">default type</a>.</p>
<blockquote><table><tr><td bgcolor="#e0e5f5"><strong>Note:</strong><code><a href="RemoveType.html">RemoveType</a></code> directives
directives, so it is possible they may undo the effects of the
latter if both occur within the same directory
configuration.</td></tr></table></blockquote>
<p>The <em>extension</em> argument is case-insensitive, and can
be specified with or without a leading dot.</p>
<hr/><h2><a name="TypesConfig">TypesConfig</a> <a name="typesconfig">Directive</a></h2><table bgcolor="#cccccc" border="0" cellspacing="0" cellpadding="1"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>The location of the mime.types file</td></tr><tr><td><a class="help" href="directive-dict.html#Syntax">Syntax:</a></td><td>TypesConfig <em>file-path</em></td></tr><tr><td><a class="help" href="directive-dict.html#Default">Default:</a></td><td><code>TypesConfig conf/mime.types</code></td></tr><tr><td><a class="help" href="directive-dict.html#Context">Context:</a></td><td>server config</td></tr><tr><td><a class="help" href="directive-dict.html#Status">Status:</a></td><td>Base</td></tr><tr><td><a class="help" href="directive-dict.html#Module">Module:</a></td><td>mod_mime</td></tr></table></td></tr></table>
<p>The TypesConfig directive sets the location of the MIME
types configuration file. <em>Filename</em> is relative to the
the default list of mappings from filename extensions to
content types; changing this file is not recommended. Use the
<a href="#addtype">AddType</a> directive instead. The file
contains lines in the format of the arguments to an AddType
command:</p>
<blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
MIME-type extension extension ...
</code></td></tr></table></blockquote>
<p>
The extensions are lower-cased. Blank lines, and lines
beginning with a hash character (`#') are ignored. </p>