mod_mime.xml revision 206b5dce9e48924aa9f12ce87f14856a4cd3fb68
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<!DOCTYPE modulesynopsis SYSTEM "/style/modulesynopsis.dtd">
e942c741056732f50da2074b36fe59805d370650slive<?xml-stylesheet type="text/xsl" href="/style/manual.en.xsl"?>
5f5d1b4cc970b7f06ff8ef6526128e9a27303d88nd<!-- $LastChangedRevision$ -->
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding Licensed to the Apache Software Foundation (ASF) under one or more
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding contributor license agreements. See the NOTICE file distributed with
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding this work for additional information regarding copyright ownership.
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding The ASF licenses this file to You under the Apache License, Version 2.0
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding (the "License"); you may not use this file except in compliance with
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding the License. You may obtain a copy of the License at
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd Unless required by applicable law or agreed to in writing, software
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd distributed under the License is distributed on an "AS IS" BASIS,
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd See the License for the specific language governing permissions and
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd limitations under the License.
75569f53579b42dc17cf097015b6b055c01e6875slive<description>Associates the requested filename's extensions
75569f53579b42dc17cf097015b6b055c01e6875slive with the file's behavior (handlers and filters)
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen and content (mime-type, language, character set and
c3fcea07965f59723831e23da647a77518285b8eslive encoding)</description>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen <p>This module is used to associate various bits of "meta
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen information" with files by their filename extensions. This
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen information relates the filename of the document to it's
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen mime-type, language, character set and encoding. This
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen information is sent to the browser, and participates in content
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen negotiation, so the user's preferences are respected when
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen choosing one of several possible files to serve. See
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen <module>mod_negotiation</module> for more information
75159a79720160d33d888cf45481ef400c1e3a01nd about <a href="/content-negotiation.html">content negotiation</a>.</p>
75569f53579b42dc17cf097015b6b055c01e6875slive module="mod_mime">AddLanguage</directive> and <directive
75569f53579b42dc17cf097015b6b055c01e6875slive module="mod_mime">AddType</directive> are all used to map file
75569f53579b42dc17cf097015b6b055c01e6875slive extensions onto the meta-information for that file. Respectively
75569f53579b42dc17cf097015b6b055c01e6875slive they set the character set, content-encoding, content-language,
c14037646789087319802aaada2e8534ccab0158slive and <glossary>MIME-type</glossary> (content-type) of documents. The directive <directive
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive module="mod_mime">TypesConfig</directive> is used to specify a
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive file which also maps extensions onto MIME types. </p>
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive <p>In addition, <module>mod_mime</module> may define the <a
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive href="/filter.html">filters</a> that originate and process
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive content. The directives <directive
75569f53579b42dc17cf097015b6b055c01e6875slive module="mod_mime">AddOutputFilter</directive>, and <directive
75569f53579b42dc17cf097015b6b055c01e6875slive module="mod_mime">AddInputFilter</directive> control the modules
75569f53579b42dc17cf097015b6b055c01e6875slive or scripts that serve the document. The <directive
75569f53579b42dc17cf097015b6b055c01e6875slive module="mod_mime">MultiviewsMatch</directive> directive allows
75569f53579b42dc17cf097015b6b055c01e6875slive <module>mod_negotiation</module> to consider these file extensions
f794e11d17dcdae9f5f2944a5bfd06a7ded6a579yoshiki to be included when testing Multiviews matches.</p>
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive <p>While <module>mod_mime</module> associates meta-information
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive with filename extensions, the <module>core</module> server
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive provides directives that are used to associate all the files in a
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive given container (<em>e.g.</em>, <directive type="section"
df5db89264efca559e954ca181763a0d3ef2f844nd module="core">Location</directive>, <directive type="section"
df5db89264efca559e954ca181763a0d3ef2f844nd module="core">Directory</directive>, or <directive type="section"
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive meta-information. These directives include <directive
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive module="core">SetInputFilter</directive>, and <directive
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive module="core">SetOutputFilter</directive>. The core directives
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive override any filename extension mappings defined in
75569f53579b42dc17cf097015b6b055c01e6875slive <p>Note that changing the meta-information for a file does not
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen change the value of the <code>Last-Modified</code> header.
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen Thus, previously cached copies may still be used by a client or
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen proxy, with the previous headers. If you change the
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen meta-information (language, content type, character set or
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen encoding) you may need to 'touch' affected files (updating
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen their last modified date) to ensure that all visitors are
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen receive the corrected content headers.</p>
75159a79720160d33d888cf45481ef400c1e3a01ndmodule="mod_mime_magic">MimeMagicFile</directive></seealso>
75569f53579b42dc17cf097015b6b055c01e6875slive<seealso><directive module="core">AddDefaultCharset</directive></seealso>
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive<seealso><directive module="core">ForceType</directive></seealso>
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive<seealso><directive module="core">DefaultType</directive></seealso>
75569f53579b42dc17cf097015b6b055c01e6875slive<seealso><directive module="core">SetHandler</directive></seealso>
75569f53579b42dc17cf097015b6b055c01e6875slive<seealso><directive module="core">SetInputFilter</directive></seealso>
75569f53579b42dc17cf097015b6b055c01e6875slive<seealso><directive module="core">SetOutputFilter</directive></seealso>
75159a79720160d33d888cf45481ef400c1e3a01nd<section id="multipleext"><title>Files with Multiple Extensions</title>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen <p>Files can have more than one extension, and the order of the
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen extensions is <em>normally</em> irrelevant. For example, if the
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen file <code>welcome.html.fr</code> maps onto content type
c14037646789087319802aaada2e8534ccab0158slive <code>welcome.fr.html</code> will map onto exactly the same
d7829068d487c77c1052fef7ad7f21d60cead2d5slive information. If more than one extension is given that maps onto
c14037646789087319802aaada2e8534ccab0158slive the same type of meta-information, then the one to the right will
c14037646789087319802aaada2e8534ccab0158slive be used, except for languages and content encodings. For example,
c14037646789087319802aaada2e8534ccab0158slive if <code>.gif</code> maps to the <glossary>MIME-type</glossary>
c14037646789087319802aaada2e8534ccab0158slive <code>image/gif</code> and <code>.html</code> maps to the
c14037646789087319802aaada2e8534ccab0158slive <code>welcome.gif.html</code> will be associated with the
73cee0397242a5dd872d618c65e416327b774f18nd <p><a href="#charset-lang">Languages</a> and <a href="#contentencoding"
73cee0397242a5dd872d618c65e416327b774f18nd >content encodings</a> are treated accumulative, because one can assign
90361ddfb3a8abaa0f8fb1729732062c78d8dc50niq more than one language or encoding to a particular resource. For example,
73cee0397242a5dd872d618c65e416327b774f18nd the file <code>welcome.html.en.de</code> will be delivered with
73cee0397242a5dd872d618c65e416327b774f18nd <code>Content-Language: en, de</code> and <code>Content-Type:
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen <p>Care should be taken when a file with multiple extensions
c14037646789087319802aaada2e8534ccab0158slive gets associated with both a <glossary>MIME-type</glossary> and a handler. This will
d7829068d487c77c1052fef7ad7f21d60cead2d5slive usually result in the request being handled by the module associated
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen with the handler. For example, if the <code>.imap</code>
75159a79720160d33d888cf45481ef400c1e3a01nd extension is mapped to the handler <code>imap-file</code> (from
7d15331eeb5429d7148d13d6fd914a641bf1c000pquerna <module>mod_imagemap</module>) and the <code>.html</code> extension is
75159a79720160d33d888cf45481ef400c1e3a01nd mapped to the MIME-type <code>text/html</code>, then the file
75159a79720160d33d888cf45481ef400c1e3a01nd <code>world.imap.html</code> will be associated with both the
75159a79720160d33d888cf45481ef400c1e3a01nd <code>imap-file</code> handler and <code>text/html</code> MIME-type.
75159a79720160d33d888cf45481ef400c1e3a01nd When it is processed, the <code>imap-file</code> handler will be used,
7d15331eeb5429d7148d13d6fd914a641bf1c000pquerna and so it will be treated as a <module>mod_imagemap</module> imagemap
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <p>If you would prefer only the last dot-separated part of the
d7829068d487c77c1052fef7ad7f21d60cead2d5slive filename to be mapped to a particular piece of meta-data, then do
d7829068d487c77c1052fef7ad7f21d60cead2d5slive not use the <code>Add*</code> directives. For example, if you wish
d7829068d487c77c1052fef7ad7f21d60cead2d5slive to have the file <code>foo.html.cgi</code> processed as a CGI
d7829068d487c77c1052fef7ad7f21d60cead2d5slive script, but not the file <code>bar.cgi.html</code>, then instead
d7829068d487c77c1052fef7ad7f21d60cead2d5slive of using <code>AddHandler cgi-script .cgi</code>, use</p>
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <example><title>Configure handler based on final extension only</title>
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <FilesMatch \.cgi$>
d7829068d487c77c1052fef7ad7f21d60cead2d5slive SetHandler cgi-script
d7829068d487c77c1052fef7ad7f21d60cead2d5slive </FilesMatch>
c3fcea07965f59723831e23da647a77518285b8eslive<section id="contentencoding"><title>Content encoding</title>
c14037646789087319802aaada2e8534ccab0158slive <p>A file of a particular <glossary>MIME-type</glossary> can additionally be encoded a
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen particular way to simplify transmission over the Internet.
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen While this usually will refer to compression, such as
c3fcea07965f59723831e23da647a77518285b8eslive <code>gzip</code>, it can also refer to encryption, such a
c3fcea07965f59723831e23da647a77518285b8eslive <code>pgp</code> or to an encoding such as UUencoding, which is
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen designed for transmitting a binary file in an ASCII (text)
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen format.</p>
1ebdc607ba27ebd12f65da5c0b24c19038fcab1cnd <p>The <a href="http://www.ietf.org/rfc/rfc2616.txt">HTTP/1.1
1ebdc607ba27ebd12f65da5c0b24c19038fcab1cnd <p>The Content-Encoding entity-header field is used as a modifier to
1ebdc607ba27ebd12f65da5c0b24c19038fcab1cnd the media-type. When present, its value indicates what additional
1ebdc607ba27ebd12f65da5c0b24c19038fcab1cnd content codings have been applied to the entity-body, and thus what
1ebdc607ba27ebd12f65da5c0b24c19038fcab1cnd decoding mechanisms must be applied in order to obtain the media-type
1ebdc607ba27ebd12f65da5c0b24c19038fcab1cnd referenced by the Content-Type header field. Content-Encoding is
1ebdc607ba27ebd12f65da5c0b24c19038fcab1cnd primarily used to allow a document to be compressed without losing
1ebdc607ba27ebd12f65da5c0b24c19038fcab1cnd the identity of its underlying media type.</p>
75159a79720160d33d888cf45481ef400c1e3a01nd </blockquote>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen href="#multipleext">section above about multiple file
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen extensions</a>), you can indicate that a file is of a
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen <p>For example, you may have a file which is a Microsoft Word
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen document, which is pkzipped to reduce its size. If the
c3fcea07965f59723831e23da647a77518285b8eslive <code>.doc</code> extension is associated with the Microsoft
c3fcea07965f59723831e23da647a77518285b8eslive Word file type, and the <code>.zip</code> extension is
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen associated with the pkzip file encoding, then the file
73cee0397242a5dd872d618c65e416327b774f18nd <code>Resume.doc.zip</code> would be known to be a pkzip'ed Word
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen document.</p>
75159a79720160d33d888cf45481ef400c1e3a01nd <p>Apache sends a <code>Content-encoding</code> header with the
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen resource, in order to tell the client browser about the
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen encoding method.</p>
75159a79720160d33d888cf45481ef400c1e3a01nd<section id="charset-lang"><title>Character sets and languages</title>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen <p>In addition to file type and the file encoding,
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen another important piece of information is what language a
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen particular document is in, and in what character set the file
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen should be displayed. For example, the document might be written
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen in the Vietnamese alphabet, or in Cyrillic, and should be
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen displayed as such. This information, also, is transmitted in
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen HTTP headers.</p>
dd6c631a85bd0659226ed0406143aeba179846d3yoshiki <p>The character set, language, encoding and mime type are all
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen used in the process of content negotiation (See
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen which document to give to the client, when there are
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen alternative documents in more than one character set, language,
75159a79720160d33d888cf45481ef400c1e3a01nd encoding or mime type. All filename extensions associations
199a8ee5984e3708982fab1ba6ebb0a5feaea90cnd created with <directive module="mod_mime">AddCharset</directive>,
199a8ee5984e3708982fab1ba6ebb0a5feaea90cnd <directive module="mod_mime">AddEncoding</directive>, <directive
199a8ee5984e3708982fab1ba6ebb0a5feaea90cnd (and extensions listed in the <directive module="mod_mime_magic"
199a8ee5984e3708982fab1ba6ebb0a5feaea90cnd >MimeMagicFile</directive>) participate in this select process.
199a8ee5984e3708982fab1ba6ebb0a5feaea90cnd Filename extensions that are only associated using the <directive
199a8ee5984e3708982fab1ba6ebb0a5feaea90cnd module="mod_mime">AddHandler</directive>, <directive module="mod_mime"
199a8ee5984e3708982fab1ba6ebb0a5feaea90cnd >AddInputFilter</directive> or <directive module="mod_mime"
199a8ee5984e3708982fab1ba6ebb0a5feaea90cnd >AddOutputFilter</directive> directives may be included or excluded
75159a79720160d33d888cf45481ef400c1e3a01nd <p>To convey this further information, Apache optionally sends
75159a79720160d33d888cf45481ef400c1e3a01nd a <code>Content-Language</code> header, to specify the language
75159a79720160d33d888cf45481ef400c1e3a01nd that the document is in, and can append additional information
75159a79720160d33d888cf45481ef400c1e3a01nd onto the <code>Content-Type</code> header to indicate the
75159a79720160d33d888cf45481ef400c1e3a01nd particular character set that should be used to correctly
75159a79720160d33d888cf45481ef400c1e3a01nd render the information.</p>
75159a79720160d33d888cf45481ef400c1e3a01nd Content-Language: en, fr<br />
75159a79720160d33d888cf45481ef400c1e3a01nd </example>
75159a79720160d33d888cf45481ef400c1e3a01nd <p>The language specification is the two-letter abbreviation
75159a79720160d33d888cf45481ef400c1e3a01nd for the language. The <code>charset</code> is the name of the
75159a79720160d33d888cf45481ef400c1e3a01nd particular character set which should be used.</p>
75159a79720160d33d888cf45481ef400c1e3a01nd </section>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<directivesynopsis>
75159a79720160d33d888cf45481ef400c1e3a01nd<description>Maps the given filename extensions to the specified content
75159a79720160d33d888cf45481ef400c1e3a01ndcharset</description>
75159a79720160d33d888cf45481ef400c1e3a01nd<syntax>AddCharset <var>charset</var> <var>extension</var>
75159a79720160d33d888cf45481ef400c1e3a01nd<contextlist><context>server config</context><context>virtual host</context>
75159a79720160d33d888cf45481ef400c1e3a01nd<context>directory</context><context>.htaccess</context></contextlist>
75159a79720160d33d888cf45481ef400c1e3a01nd <p>The <directive>AddCharset</directive> directive maps the given
75159a79720160d33d888cf45481ef400c1e3a01nd filename extensions to the specified content charset. <var>charset</var>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding is the <a href="http://www.iana.org/assignments/character-sets">MIME
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding charset parameter</a> of filenames containing
75159a79720160d33d888cf45481ef400c1e3a01nd <var>extension</var>. This mapping is added to any already in force,
75159a79720160d33d888cf45481ef400c1e3a01nd overriding any mappings that already exist for the same
75159a79720160d33d888cf45481ef400c1e3a01nd AddLanguage ja .ja<br />
75159a79720160d33d888cf45481ef400c1e3a01nd AddCharset EUC-JP .euc<br />
75159a79720160d33d888cf45481ef400c1e3a01nd AddCharset ISO-2022-JP .jis<br />
75159a79720160d33d888cf45481ef400c1e3a01nd AddCharset SHIFT_JIS .sjis
75159a79720160d33d888cf45481ef400c1e3a01nd </example>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen <p>Then the document <code>xxxx.ja.jis</code> will be treated
75159a79720160d33d888cf45481ef400c1e3a01nd as being a Japanese document whose charset is <code>ISO-2022-JP</code>
75159a79720160d33d888cf45481ef400c1e3a01nd <directive>AddCharset</directive> directive is useful for both to
75159a79720160d33d888cf45481ef400c1e3a01nd inform the client about the character encoding of the document so that
75159a79720160d33d888cf45481ef400c1e3a01nd the document can be interpreted and displayed appropriately, and for <a
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen href="/content-negotiation.html">content negotiation</a>,
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen where the server returns one from several documents based on
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen the client's charset preference.</p>
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <p>The <var>extension</var> argument is case-insensitive and can
d7829068d487c77c1052fef7ad7f21d60cead2d5slive be specified with or without a leading dot. Filenames may have <a
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <var>extension</var> argument will be compared against each of
75569f53579b42dc17cf097015b6b055c01e6875slive<seealso><directive module="core">AddDefaultCharset</directive></seealso>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<directivesynopsis>
75159a79720160d33d888cf45481ef400c1e3a01nd<description>Maps the given filename extensions to the specified encoding
75159a79720160d33d888cf45481ef400c1e3a01ndtype</description>
75159a79720160d33d888cf45481ef400c1e3a01nd<syntax>AddEncoding <var>MIME-enc</var> <var>extension</var>
75159a79720160d33d888cf45481ef400c1e3a01nd<contextlist><context>server config</context><context>virtual host</context>
75159a79720160d33d888cf45481ef400c1e3a01nd<context>directory</context><context>.htaccess</context></contextlist>
75159a79720160d33d888cf45481ef400c1e3a01nd <p>The <directive>AddEncoding</directive> directive maps the given
75159a79720160d33d888cf45481ef400c1e3a01nd filename extensions to the specified encoding type. <var>MIME-enc</var>
75159a79720160d33d888cf45481ef400c1e3a01nd is the MIME encoding to use for documents containing the
75159a79720160d33d888cf45481ef400c1e3a01nd <var>extension</var>. This mapping is added to any already in force,
75159a79720160d33d888cf45481ef400c1e3a01nd overriding any mappings that already exist for the same
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen AddEncoding x-gzip .gz<br />
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen AddEncoding x-compress .Z
75159a79720160d33d888cf45481ef400c1e3a01nd <p>This will cause filenames containing the <code>.gz</code> extension
75159a79720160d33d888cf45481ef400c1e3a01nd to be marked as encoded using the <code>x-gzip</code> encoding, and
75159a79720160d33d888cf45481ef400c1e3a01nd filenames containing the <code>.Z</code> extension to be marked as
75159a79720160d33d888cf45481ef400c1e3a01nd <p>Old clients expect <code>x-gzip</code> and <code>x-compress</code>,
75159a79720160d33d888cf45481ef400c1e3a01nd however the standard dictates that they're equivalent to
75159a79720160d33d888cf45481ef400c1e3a01nd <code>gzip</code> and <code>compress</code> respectively. Apache does
75159a79720160d33d888cf45481ef400c1e3a01nd content encoding comparisons by ignoring any leading <code>x-</code>.
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen When responding with an encoding Apache will use whatever form
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen (<em>i.e.</em>, <code>x-foo</code> or <code>foo</code>) the
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen client requested. If the client didn't specifically request a
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen particular form Apache will use the form given by the
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen <code>AddEncoding</code> directive. To make this long story
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen <code>x-compress</code> for these two specific encodings. More
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen recent encodings, such as <code>deflate</code> should be
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <p>The <var>extension</var> argument is case-insensitive and can
d7829068d487c77c1052fef7ad7f21d60cead2d5slive be specified with or without a leading dot. Filenames may have <a
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <var>extension</var> argument will be compared against each of
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<directivesynopsis>
75159a79720160d33d888cf45481ef400c1e3a01nd<description>Maps the filename extensions to the specified
75159a79720160d33d888cf45481ef400c1e3a01ndhandler</description>
75159a79720160d33d888cf45481ef400c1e3a01nd<syntax>AddHandler <var>handler-name</var> <var>extension</var>
75159a79720160d33d888cf45481ef400c1e3a01nd<contextlist><context>server config</context><context>virtual host</context>
75159a79720160d33d888cf45481ef400c1e3a01nd<context>directory</context><context>.htaccess</context></contextlist>
75159a79720160d33d888cf45481ef400c1e3a01nd <p>Files having the name <var>extension</var> will be served by the
75159a79720160d33d888cf45481ef400c1e3a01nd specified <var><a href="/handler.html">handler-name</a></var>. This
75159a79720160d33d888cf45481ef400c1e3a01nd mapping is added to any already in force, overriding any mappings that
75159a79720160d33d888cf45481ef400c1e3a01nd already exist for the same <var>extension</var>. For example, to
75159a79720160d33d888cf45481ef400c1e3a01nd activate CGI scripts with the file extension <code>.cgi</code>, you
75159a79720160d33d888cf45481ef400c1e3a01nd might use:</p>
75159a79720160d33d888cf45481ef400c1e3a01nd AddHandler cgi-script .cgi
75159a79720160d33d888cf45481ef400c1e3a01nd </example>
75159a79720160d33d888cf45481ef400c1e3a01nd <p>Once that has been put into your httpd.conf file, any file containing
75159a79720160d33d888cf45481ef400c1e3a01nd the <code>.cgi</code> extension will be treated as a CGI program.</p>
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <p>The <var>extension</var> argument is case-insensitive and can
d7829068d487c77c1052fef7ad7f21d60cead2d5slive be specified with or without a leading dot. Filenames may have <a
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <var>extension</var> argument will be compared against each of
75569f53579b42dc17cf097015b6b055c01e6875slive<seealso><directive module="core">SetHandler</directive></seealso>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<directivesynopsis>
75159a79720160d33d888cf45481ef400c1e3a01nd<description>Maps filename extensions to the filters that will process
75159a79720160d33d888cf45481ef400c1e3a01ndclient requests</description>
75159a79720160d33d888cf45481ef400c1e3a01nd<syntax>AddInputFilter <var>filter</var>[;<var>filter</var>...]
75159a79720160d33d888cf45481ef400c1e3a01nd<contextlist><context>server config</context><context>virtual host</context>
75159a79720160d33d888cf45481ef400c1e3a01nd<context>directory</context><context>.htaccess</context></contextlist>
75159a79720160d33d888cf45481ef400c1e3a01nd<compatibility>AddInputFilter is only available in Apache 2.0.26 and
75159a79720160d33d888cf45481ef400c1e3a01ndlater.</compatibility>
75159a79720160d33d888cf45481ef400c1e3a01nd <p><directive>AddInputFilter</directive> maps the filename extension
75159a79720160d33d888cf45481ef400c1e3a01nd <var>extension</var> to the <a href="/filter.html">filters</a> which
75159a79720160d33d888cf45481ef400c1e3a01nd will process client requests and POST input when they are received by
75159a79720160d33d888cf45481ef400c1e3a01nd the server. This is in addition to any filters defined elsewhere,
75159a79720160d33d888cf45481ef400c1e3a01nd including the <directive module="core">SetInputFilter</directive>
75159a79720160d33d888cf45481ef400c1e3a01nd directive. This mapping is merged over any already in force, overriding
75159a79720160d33d888cf45481ef400c1e3a01nd any mappings that already exist for the same <var>extension</var>.</p>
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <p>If more than one <var>filter</var> is specified, they must be separated
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen by semicolons in the order in which they should process the
d7829068d487c77c1052fef7ad7f21d60cead2d5slive content. The <var>filter</var> is case-insensitive.</p>
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <p>The <var>extension</var> argument is case-insensitive and can
d7829068d487c77c1052fef7ad7f21d60cead2d5slive be specified with or without a leading dot. Filenames may have <a
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <var>extension</var> argument will be compared against each of
62e106881e35e8086a5c936db3c81e34adb872aejerenkrantz<seealso><directive module="mod_mime">RemoveInputFilter</directive></seealso>
62e106881e35e8086a5c936db3c81e34adb872aejerenkrantz<seealso><directive module="core">SetInputFilter</directive></seealso>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<directivesynopsis>
75159a79720160d33d888cf45481ef400c1e3a01nd<description>Maps the given filename extension to the specified content
75159a79720160d33d888cf45481ef400c1e3a01ndlanguage</description>
75159a79720160d33d888cf45481ef400c1e3a01nd<syntax>AddLanguage <var>MIME-lang</var> <var>extension</var>
75159a79720160d33d888cf45481ef400c1e3a01nd<contextlist><context>server config</context><context>virtual host</context>
75159a79720160d33d888cf45481ef400c1e3a01nd<context>directory</context><context>.htaccess</context></contextlist>
75159a79720160d33d888cf45481ef400c1e3a01nd <p>The <directive>AddLanguage</directive> directive maps the given
75159a79720160d33d888cf45481ef400c1e3a01nd filename extension to the specified content language.
75159a79720160d33d888cf45481ef400c1e3a01nd <var>MIME-lang</var> is the MIME language of filenames containing
75159a79720160d33d888cf45481ef400c1e3a01nd <var>extension</var>. This mapping is added to any already in force,
75159a79720160d33d888cf45481ef400c1e3a01nd overriding any mappings that already exist for the same
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen AddEncoding x-compress .Z<br />
75159a79720160d33d888cf45481ef400c1e3a01nd AddLanguage en .en<br />
75159a79720160d33d888cf45481ef400c1e3a01nd AddLanguage fr .fr
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen <p>Then the document <code>xxxx.en.Z</code> will be treated as
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen being a compressed English document (as will the document
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen <code>xxxx.Z.en</code>). Although the content language is
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen reported to the client, the browser is unlikely to use this
75159a79720160d33d888cf45481ef400c1e3a01nd information. The <directive>AddLanguage</directive> directive is
75159a79720160d33d888cf45481ef400c1e3a01nd more useful for <a href="/content-negotiation.html">content
75159a79720160d33d888cf45481ef400c1e3a01nd negotiation</a>, where the server returns one from several documents
75159a79720160d33d888cf45481ef400c1e3a01nd based on the client's language preference.</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen <p>If multiple language assignments are made for the same
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen extension, the last one encountered is the one that is used.
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen That is, for the case of:</p>
75159a79720160d33d888cf45481ef400c1e3a01nd AddLanguage en .en<br />
81da8cb0d21899ebed3e4afe3afeeb67ee3288dcslive AddLanguage en-gb .en<br />
75159a79720160d33d888cf45481ef400c1e3a01nd AddLanguage en-us .en
75159a79720160d33d888cf45481ef400c1e3a01nd </example>
75159a79720160d33d888cf45481ef400c1e3a01nd <p>documents with the extension <code>.en</code> would be treated as
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <p>The <var>extension</var> argument is case-insensitive and can
d7829068d487c77c1052fef7ad7f21d60cead2d5slive be specified with or without a leading dot. Filenames may have <a
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <var>extension</var> argument will be compared against each of
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<directivesynopsis>
75159a79720160d33d888cf45481ef400c1e3a01nd<description>Maps filename extensions to the filters that will process
c3fcea07965f59723831e23da647a77518285b8esliveresponses from the server</description>
75159a79720160d33d888cf45481ef400c1e3a01nd<syntax>AddOutputFilter <var>filter</var>[;<var>filter</var>...]
75159a79720160d33d888cf45481ef400c1e3a01nd<contextlist><context>server config</context><context>virtual host</context>
75159a79720160d33d888cf45481ef400c1e3a01nd<context>directory</context><context>.htaccess</context></contextlist>
75159a79720160d33d888cf45481ef400c1e3a01nd<compatibility>AddOutputFilter is only available in Apache 2.0.26 and
75159a79720160d33d888cf45481ef400c1e3a01ndlater.</compatibility>
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive <p>The <directive>AddOutputFilter</directive> directive maps the
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive href="/filter.html">filters</a> which will process responses
75159a79720160d33d888cf45481ef400c1e3a01nd from the server before they are sent to the client. This is in
75159a79720160d33d888cf45481ef400c1e3a01nd addition to any filters defined elsewhere, including <directive
75159a79720160d33d888cf45481ef400c1e3a01nd module="core">SetOutputFilter</directive> and <directive module="core"
75159a79720160d33d888cf45481ef400c1e3a01nd >AddOutputFilterByType</directive> directive. This mapping is merged
75159a79720160d33d888cf45481ef400c1e3a01nd over any already in force, overriding any mappings that already exist
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen <p>For example, the following configuration will process all
75159a79720160d33d888cf45481ef400c1e3a01nd <code>.shtml</code> files for server-side includes and will then
75159a79720160d33d888cf45481ef400c1e3a01nd compress the output using <module>mod_deflate</module>.</p>
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive AddOutputFilter INCLUDES;DEFLATE shtml
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen <p>If more than one filter is specified, they must be separated
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen by semicolons in the order in which they should process the
d7829068d487c77c1052fef7ad7f21d60cead2d5slive content. The <var>filter</var> argument is case-insensitive.</p>
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <p>The <var>extension</var> argument is case-insensitive and can
d7829068d487c77c1052fef7ad7f21d60cead2d5slive be specified with or without a leading dot. Filenames may have <a
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <var>extension</var> argument will be compared against each of
44c61920e384b819aba8ad43310c67c71fa64a48rbowen<seealso><directive module="mod_mime">RemoveOutputFilter</directive></seealso>
62e106881e35e8086a5c936db3c81e34adb872aejerenkrantz<seealso><directive module="core">SetOutputFilter</directive></seealso>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<directivesynopsis>
75159a79720160d33d888cf45481ef400c1e3a01nd<description>Maps the given filename extensions onto the specified content
75159a79720160d33d888cf45481ef400c1e3a01ndtype</description>
75159a79720160d33d888cf45481ef400c1e3a01nd<contextlist><context>server config</context><context>virtual host</context>
75159a79720160d33d888cf45481ef400c1e3a01nd<context>directory</context><context>.htaccess</context></contextlist>
c14037646789087319802aaada2e8534ccab0158slive <p>The <directive>AddType</directive> directive maps the given
c14037646789087319802aaada2e8534ccab0158slive filename extensions onto the specified content
c14037646789087319802aaada2e8534ccab0158slive type. <var>MIME-type</var> is the <glossary ref="mime-type">MIME
c14037646789087319802aaada2e8534ccab0158slive type</glossary> to use for filenames containing
c14037646789087319802aaada2e8534ccab0158slive <var>extension</var>. This mapping is added to any already in
c14037646789087319802aaada2e8534ccab0158slive force, overriding any mappings that already exist for the same
c14037646789087319802aaada2e8534ccab0158slive <var>extension</var>. This directive can be used to add mappings
c14037646789087319802aaada2e8534ccab0158slive not listed in the MIME types file (see the <directive
c14037646789087319802aaada2e8534ccab0158slive module="mod_mime">TypesConfig</directive> directive).</p>
9f00c9d5e1adf4fdcd4eb8b3fea25e726829e14erbowen <p>Or, to specify multiple file extensions in one directive:</p>
75159a79720160d33d888cf45481ef400c1e3a01nd It is recommended that new MIME types be added using the
75159a79720160d33d888cf45481ef400c1e3a01nd <directive>AddType</directive> directive rather than changing the
75159a79720160d33d888cf45481ef400c1e3a01nd <directive module="mod_mime">TypesConfig</directive> file.
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <p>The <var>extension</var> argument is case-insensitive and can
d7829068d487c77c1052fef7ad7f21d60cead2d5slive be specified with or without a leading dot. Filenames may have <a
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <var>extension</var> argument will be compared against each of
75569f53579b42dc17cf097015b6b055c01e6875slive<seealso><directive module="core">DefaultType</directive></seealso>
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive<seealso><directive module="core">ForceType</directive></seealso>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<directivesynopsis>
75159a79720160d33d888cf45481ef400c1e3a01nd<description>The types of files that will be included when searching for
75159a79720160d33d888cf45481ef400c1e3a01nda matching file with MultiViews</description>
75159a79720160d33d888cf45481ef400c1e3a01nd<syntax>MultiviewsMatch Any|NegotiatedOnly|Filters|Handlers
75159a79720160d33d888cf45481ef400c1e3a01nd[Handlers|Filters]</syntax>
75159a79720160d33d888cf45481ef400c1e3a01nd<contextlist><context>server config</context><context>virtual host</context>
75159a79720160d33d888cf45481ef400c1e3a01nd<context>directory</context><context>.htaccess</context></contextlist>
75159a79720160d33d888cf45481ef400c1e3a01nd<compatibility>Available in Apache 2.0.26 and later.</compatibility>
75159a79720160d33d888cf45481ef400c1e3a01nd <p><directive>MultiviewsMatch</directive> permits three different
75159a79720160d33d888cf45481ef400c1e3a01nd behaviors for <a href="mod_negotiation.html">mod_negotiation</a>'s
75159a79720160d33d888cf45481ef400c1e3a01nd Multiviews feature. Multiviews allows a request for a file,
75159a79720160d33d888cf45481ef400c1e3a01nd <em>e.g.</em> <code>index.html</code>, to match any negotiated
75159a79720160d33d888cf45481ef400c1e3a01nd <code>index.html.en</code>, <code>index.html.fr</code>, or
75159a79720160d33d888cf45481ef400c1e3a01nd <p>The <code>NegotiatedOnly</code> option provides that every extension
75159a79720160d33d888cf45481ef400c1e3a01nd following the base name must correlate to a recognized
75159a79720160d33d888cf45481ef400c1e3a01nd <module>mod_mime</module> extension for content negotation, <em>e.g.</em>
75159a79720160d33d888cf45481ef400c1e3a01nd Charset, Content-Type, Language, or Encoding. This is the strictest
75159a79720160d33d888cf45481ef400c1e3a01nd implementation with the fewest unexpected side effects, and is the
75159a79720160d33d888cf45481ef400c1e3a01nd default behavior.</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen <p>To include extensions associated with Handlers and/or Filters,
75159a79720160d33d888cf45481ef400c1e3a01nd set the <directive>MultiviewsMatch</directive> directive to either
75159a79720160d33d888cf45481ef400c1e3a01nd <code>Handlers</code>, <code>Filters</code>, or both option keywords.
75159a79720160d33d888cf45481ef400c1e3a01nd If all other factors are equal, the smallest file will be served,
75159a79720160d33d888cf45481ef400c1e3a01nd <em>e.g.</em> in deciding between <code>index.html.cgi</code> of 500
75159a79720160d33d888cf45481ef400c1e3a01nd bytes and <code>index.html.pl</code> of 1000 bytes, the <code>.cgi</code>
75159a79720160d33d888cf45481ef400c1e3a01nd file would win in this example. Users of <code>.asis</code> files
75159a79720160d33d888cf45481ef400c1e3a01nd might prefer to use the Handler option, if <code>.asis</code> files are
75159a79720160d33d888cf45481ef400c1e3a01nd <p>You may finally allow <code>Any</code> extensions to match, even if
75159a79720160d33d888cf45481ef400c1e3a01nd <module>mod_mime</module> doesn't recognize the extension. This was the
75159a79720160d33d888cf45481ef400c1e3a01nd behavior in Apache 1.3, and can cause unpredicatable results, such as
75159a79720160d33d888cf45481ef400c1e3a01nd serving .old or .bak files the webmaster never expected to be served.</p>
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive <p>For example, the following configuration will allow handlers
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive and filters to participate in Multviews, but will exclude unknown
75159a79720160d33d888cf45481ef400c1e3a01nd MultiviewsMatch Handlers Filters
75159a79720160d33d888cf45481ef400c1e3a01nd </example>
75569f53579b42dc17cf097015b6b055c01e6875slive<seealso><directive module="core">Options</directive></seealso>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<directivesynopsis>
75159a79720160d33d888cf45481ef400c1e3a01nd<description>Sets all files in the given scope to the specified
75159a79720160d33d888cf45481ef400c1e3a01ndlanguage</description>
75159a79720160d33d888cf45481ef400c1e3a01nd<contextlist><context>server config</context><context>virtual host</context>
75159a79720160d33d888cf45481ef400c1e3a01nd<context>directory</context><context>.htaccess</context></contextlist>
75159a79720160d33d888cf45481ef400c1e3a01nd <p>The <directive>DefaultLanguage</directive> directive tells Apache
75159a79720160d33d888cf45481ef400c1e3a01nd that all files in the directive's scope (<em>e.g.</em>, all files
75159a79720160d33d888cf45481ef400c1e3a01nd covered by the current <directive module="core" type="section"
75159a79720160d33d888cf45481ef400c1e3a01nd >Directory</directive> container) that don't have an explicit language
75159a79720160d33d888cf45481ef400c1e3a01nd extension (such as <code>.fr</code> or <code>.de</code> as configured
75159a79720160d33d888cf45481ef400c1e3a01nd by <directive module="mod_mime">AddLanguage</directive>) should be
75159a79720160d33d888cf45481ef400c1e3a01nd considered to be in the specified <var>MIME-lang</var> language. This
75159a79720160d33d888cf45481ef400c1e3a01nd allows entire directories to be marked as containing Dutch content, for
75159a79720160d33d888cf45481ef400c1e3a01nd instance, without having to rename each file. Note that unlike using
75159a79720160d33d888cf45481ef400c1e3a01nd extensions to specify languages, <directive>DefaultLanguage</directive>
75159a79720160d33d888cf45481ef400c1e3a01nd can only specify a single language.</p>
75159a79720160d33d888cf45481ef400c1e3a01nd <p>If no <directive>DefaultLanguage</directive> directive is in force,
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen and a file does not have any language extensions as configured
75159a79720160d33d888cf45481ef400c1e3a01nd by <directive module="mod_mime">AddLanguage</directive>, then that file
75159a79720160d33d888cf45481ef400c1e3a01nd will be considered to have no language attribute.</p>
75159a79720160d33d888cf45481ef400c1e3a01nd DefaultLanguage en
75159a79720160d33d888cf45481ef400c1e3a01nd </example>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</directivesynopsis>
21b70e758d670601065db7b05e16441226e4e9b4jerenkrantz<directivesynopsis>
75159a79720160d33d888cf45481ef400c1e3a01nd<description>Tells <module>mod_mime</module> to treat <code>path_info</code>
75159a79720160d33d888cf45481ef400c1e3a01ndcomponents as part of the filename</description>
21b70e758d670601065db7b05e16441226e4e9b4jerenkrantz<compatibility>Available in Apache 2.0.41 and later</compatibility>
df5db89264efca559e954ca181763a0d3ef2f844nd <p>The <directive>ModMimeUsePathInfo</directive> directive is used to
75159a79720160d33d888cf45481ef400c1e3a01nd combine the filename with the <code>path_info</code> URL component to
75159a79720160d33d888cf45481ef400c1e3a01nd apply <module>mod_mime</module>'s directives to the request. The default
75159a79720160d33d888cf45481ef400c1e3a01nd value is <code>Off</code> - therefore, the <code>path_info</code>
75159a79720160d33d888cf45481ef400c1e3a01nd component is ignored.</p>
df5db89264efca559e954ca181763a0d3ef2f844nd <p>This directive is recommended when you have a virtual filesystem.</p>
df5db89264efca559e954ca181763a0d3ef2f844nd ModMimeUsePathInfo On
df5db89264efca559e954ca181763a0d3ef2f844nd </example>
df5db89264efca559e954ca181763a0d3ef2f844nd <p>If you have a request for <code>/bar/foo.shtml</code> where
75159a79720160d33d888cf45481ef400c1e3a01nd <module>mod_mime</module> will treat the incoming request as
75159a79720160d33d888cf45481ef400c1e3a01nd <code>/bar/foo.shtml</code> and directives like <code>AddOutputFilter
75159a79720160d33d888cf45481ef400c1e3a01nd INCLUDES .shtml</code> will add the <code>INCLUDES</code> filter to the
75159a79720160d33d888cf45481ef400c1e3a01nd request. If <directive>ModMimeUsePathInfo</directive> is not set, the
75159a79720160d33d888cf45481ef400c1e3a01nd<seealso><directive module="core">AcceptPathInfo</directive></seealso>
21b70e758d670601065db7b05e16441226e4e9b4jerenkrantz</directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<directivesynopsis>
75569f53579b42dc17cf097015b6b055c01e6875slive<description>Removes any character set associations for a set of file
75569f53579b42dc17cf097015b6b055c01e6875sliveextensions</description>
75159a79720160d33d888cf45481ef400c1e3a01nd<syntax>RemoveCharset <var>extension</var> [<var>extension</var>]
75159a79720160d33d888cf45481ef400c1e3a01nd...</syntax>
75159a79720160d33d888cf45481ef400c1e3a01nd<contextlist><context>virtual host</context><context>directory</context>
75159a79720160d33d888cf45481ef400c1e3a01nd<compatibility>RemoveCharset is only available in Apache 2.0.24 and
75159a79720160d33d888cf45481ef400c1e3a01ndlater.</compatibility>
75159a79720160d33d888cf45481ef400c1e3a01nd <p>The <directive>RemoveCharset</directive> directive removes any
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen character set associations for files with the given extensions.
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen This allows <code>.htaccess</code> files in subdirectories to
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen undo any associations inherited from parent directories or the
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen server config files.</p>
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <p>The <var>extension</var> argument is case-insensitive and can
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen be specified with or without a leading dot.</p>
75159a79720160d33d888cf45481ef400c1e3a01nd RemoveCharset .html .shtml
75159a79720160d33d888cf45481ef400c1e3a01nd </example>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<directivesynopsis>
75569f53579b42dc17cf097015b6b055c01e6875slive<description>Removes any content encoding associations for a set of file
75569f53579b42dc17cf097015b6b055c01e6875sliveextensions</description>
75159a79720160d33d888cf45481ef400c1e3a01nd<syntax>RemoveEncoding <var>extension</var> [<var>extension</var>]
75159a79720160d33d888cf45481ef400c1e3a01nd...</syntax>
75159a79720160d33d888cf45481ef400c1e3a01nd<contextlist><context>virtual host</context><context>directory</context>
75159a79720160d33d888cf45481ef400c1e3a01nd <p>The <directive>RemoveEncoding</directive> directive removes any
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen encoding associations for files with the given extensions. This
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen allows <code>.htaccess</code> files in subdirectories to undo
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen any associations inherited from parent directories or the
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen server config files. An example of its use might be:</p>
75159a79720160d33d888cf45481ef400c1e3a01nd AddEncoding x-gzip .gz<br />
75159a79720160d33d888cf45481ef400c1e3a01nd RemoveEncoding .gz<br />
75159a79720160d33d888cf45481ef400c1e3a01nd </Files>
75159a79720160d33d888cf45481ef400c1e3a01nd </example>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen <p>This will cause <code>foo.gz</code> to be marked as being
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen encoded with the gzip method, but <code>foo.gz.asc</code> as an
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen unencoded plaintext file.</p>
75159a79720160d33d888cf45481ef400c1e3a01nd <p><directive>RemoveEncoding</directive> directives are processed
75159a79720160d33d888cf45481ef400c1e3a01nd <em>after</em> any <directive module="mod_mime">AddEncoding</directive>
75159a79720160d33d888cf45481ef400c1e3a01nd directives, so it is possible they may undo the effects of the latter
75159a79720160d33d888cf45481ef400c1e3a01nd if both occur within the same directory configuration.</p>
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <p>The <var>extension</var> argument is case-insensitive and can
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen be specified with or without a leading dot.</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<directivesynopsis>
75569f53579b42dc17cf097015b6b055c01e6875slive<description>Removes any handler associations for a set of file
75569f53579b42dc17cf097015b6b055c01e6875sliveextensions</description>
75159a79720160d33d888cf45481ef400c1e3a01nd<syntax>RemoveHandler <var>extension</var> [<var>extension</var>]
75159a79720160d33d888cf45481ef400c1e3a01nd...</syntax>
75159a79720160d33d888cf45481ef400c1e3a01nd<contextlist><context>virtual host</context><context>directory</context>
75159a79720160d33d888cf45481ef400c1e3a01nd <p>The <directive>RemoveHandler</directive> directive removes any
75159a79720160d33d888cf45481ef400c1e3a01nd handler associations for files with the given extensions. This allows
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen <code>.htaccess</code> files in subdirectories to undo any
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen associations inherited from parent directories or the server
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen config files. An example of its use might be:</p>
75159a79720160d33d888cf45481ef400c1e3a01nd AddHandler server-parsed .html
75159a79720160d33d888cf45481ef400c1e3a01nd </example>
75159a79720160d33d888cf45481ef400c1e3a01nd RemoveHandler .html
75159a79720160d33d888cf45481ef400c1e3a01nd </example>
c3fcea07965f59723831e23da647a77518285b8eslive <p>This has the effect of returning <code>.html</code> files in
c3fcea07965f59723831e23da647a77518285b8eslive the <code>/foo/bar</code> directory to being treated as normal
75159a79720160d33d888cf45481ef400c1e3a01nd files, rather than as candidates for parsing (see the <module
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <p>The <var>extension</var> argument is case-insensitive and can
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen be specified with or without a leading dot.</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<directivesynopsis>
75569f53579b42dc17cf097015b6b055c01e6875slive<description>Removes any input filter associations for a set of file
75569f53579b42dc17cf097015b6b055c01e6875sliveextensions</description>
75159a79720160d33d888cf45481ef400c1e3a01nd<syntax>RemoveInputFilter <var>extension</var> [<var>extension</var>]
75159a79720160d33d888cf45481ef400c1e3a01nd...</syntax>
75159a79720160d33d888cf45481ef400c1e3a01nd<contextlist><context>virtual host</context><context>directory</context>
75159a79720160d33d888cf45481ef400c1e3a01nd<compatibility>RemoveInputFilter is only available in Apache 2.0.26 and
75159a79720160d33d888cf45481ef400c1e3a01ndlater.</compatibility>
75159a79720160d33d888cf45481ef400c1e3a01nd <p>The <directive>RemoveInputFilter</directive> directive removes any
2ca3062001e1ea6e0b3b8060e1150f3a5435311bnoodl input <a href="/filter.html">filter</a> associations for files with
2ca3062001e1ea6e0b3b8060e1150f3a5435311bnoodl the given extensions.
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen This allows <code>.htaccess</code> files in subdirectories to
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen undo any associations inherited from parent directories or the
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen server config files.</p>
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <p>The <var>extension</var> argument is case-insensitive and can
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen be specified with or without a leading dot.</p>
62e106881e35e8086a5c936db3c81e34adb872aejerenkrantz<seealso><directive module="mod_mime">AddInputFilter</directive></seealso>
62e106881e35e8086a5c936db3c81e34adb872aejerenkrantz<seealso><directive module="core">SetInputFilter</directive></seealso>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<directivesynopsis>
75569f53579b42dc17cf097015b6b055c01e6875slive<description>Removes any language associations for a set of file
75569f53579b42dc17cf097015b6b055c01e6875sliveextensions</description>
75159a79720160d33d888cf45481ef400c1e3a01nd<syntax>RemoveLanguage <var>extension</var> [<var>extension</var>]
75159a79720160d33d888cf45481ef400c1e3a01nd...</syntax>
75159a79720160d33d888cf45481ef400c1e3a01nd<contextlist><context>virtual host</context><context>directory</context>
75159a79720160d33d888cf45481ef400c1e3a01nd<compatibility>RemoveLanguage is only available in Apache 2.0.24 and
75159a79720160d33d888cf45481ef400c1e3a01ndlater.</compatibility>
75159a79720160d33d888cf45481ef400c1e3a01nd <p>The <directive>RemoveLanguage</directive> directive removes any
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen language associations for files with the given extensions. This
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen allows <code>.htaccess</code> files in subdirectories to undo
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen any associations inherited from parent directories or the
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen server config files.</p>
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <p>The <var>extension</var> argument is case-insensitive and can
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen be specified with or without a leading dot.</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<directivesynopsis>
75569f53579b42dc17cf097015b6b055c01e6875slive<description>Removes any output filter associations for a set of file
75569f53579b42dc17cf097015b6b055c01e6875sliveextensions</description>
75159a79720160d33d888cf45481ef400c1e3a01nd<syntax>RemoveOutputFilter <var>extension</var> [<var>extension</var>]
75159a79720160d33d888cf45481ef400c1e3a01nd...</syntax>
75159a79720160d33d888cf45481ef400c1e3a01nd<contextlist><context>virtual host</context><context>directory</context>
75159a79720160d33d888cf45481ef400c1e3a01nd<compatibility>RemoveOutputFilter is only available in Apache 2.0.26 and
75159a79720160d33d888cf45481ef400c1e3a01ndlater.</compatibility>
75159a79720160d33d888cf45481ef400c1e3a01nd <p>The <directive>RemoveOutputFilter</directive> directive removes any
2ca3062001e1ea6e0b3b8060e1150f3a5435311bnoodl output <a href="/filter.html">filter</a> associations for files with
2ca3062001e1ea6e0b3b8060e1150f3a5435311bnoodl the given extensions.
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen This allows <code>.htaccess</code> files in subdirectories to
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen undo any associations inherited from parent directories or the
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen server config files.</p>
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <p>The <var>extension</var> argument is case-insensitive and can
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen be specified with or without a leading dot.</p>
75159a79720160d33d888cf45481ef400c1e3a01nd RemoveOutputFilter shtml
44c61920e384b819aba8ad43310c67c71fa64a48rbowen<seealso><directive module="mod_mime">AddOutputFilter</directive></seealso>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<directivesynopsis>
75569f53579b42dc17cf097015b6b055c01e6875slive<description>Removes any content type associations for a set of file
75569f53579b42dc17cf097015b6b055c01e6875sliveextensions</description>
75159a79720160d33d888cf45481ef400c1e3a01nd<syntax>RemoveType <var>extension</var> [<var>extension</var>]
75159a79720160d33d888cf45481ef400c1e3a01nd...</syntax>
75159a79720160d33d888cf45481ef400c1e3a01nd<contextlist><context>virtual host</context><context>directory</context>
c14037646789087319802aaada2e8534ccab0158slive <p>The <directive>RemoveType</directive> directive removes any
c14037646789087319802aaada2e8534ccab0158slive <glossary ref="mime-type">MIME type</glossary> associations for files with
c14037646789087319802aaada2e8534ccab0158slive the given extensions. This allows <code>.htaccess</code> files in
c14037646789087319802aaada2e8534ccab0158slive subdirectories to undo any associations inherited from parent
c14037646789087319802aaada2e8534ccab0158slive directories or the server config files. An example of its use
c14037646789087319802aaada2e8534ccab0158slive might be:</p>
75159a79720160d33d888cf45481ef400c1e3a01nd RemoveType .cgi
75159a79720160d33d888cf45481ef400c1e3a01nd </example>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen <p>This will remove any special handling of <code>.cgi</code>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen files in the <code>/foo/</code> directory and any beneath it,
75159a79720160d33d888cf45481ef400c1e3a01nd causing the files to be treated as being of the <directive
75159a79720160d33d888cf45481ef400c1e3a01nd <p><directive>RemoveType</directive> directives are processed
75159a79720160d33d888cf45481ef400c1e3a01nd <em>after</em> any <directive module="mod_mime">AddType</directive>
75159a79720160d33d888cf45481ef400c1e3a01nd directives, so it is possible they may undo the effects of the
75159a79720160d33d888cf45481ef400c1e3a01nd latter if both occur within the same directory configuration.</p>
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <p>The <var>extension</var> argument is case-insensitive and can
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen be specified with or without a leading dot.</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<directivesynopsis>
75159a79720160d33d888cf45481ef400c1e3a01nd<description>The location of the <code>mime.types</code> file</description>
75159a79720160d33d888cf45481ef400c1e3a01nd<contextlist><context>server config</context></contextlist>
c14037646789087319802aaada2e8534ccab0158slive <p>The <directive>TypesConfig</directive> directive sets the
c14037646789087319802aaada2e8534ccab0158slive location of the <glossary ref="mime-type">MIME types</glossary>
c14037646789087319802aaada2e8534ccab0158slive configuration file. <var>File-path</var> is relative to the
c14037646789087319802aaada2e8534ccab0158slive <directive module="core">ServerRoot</directive>. This file sets
75159a79720160d33d888cf45481ef400c1e3a01nd the default list of mappings from filename extensions to content
c14037646789087319802aaada2e8534ccab0158slive types. Most administrators use the provided
c14037646789087319802aaada2e8534ccab0158slive <code>mime.types</code> file, which associates common filename
c14037646789087319802aaada2e8534ccab0158slive extensions with IANA registered content types. The current list is
c14037646789087319802aaada2e8534ccab0158slive maintained at <a href=
2fe6dbdcdf06a7b17004f5c138e362ad8ab9c27frbowen "http://www.iana.org/assignments/media-types/index.html"
c14037646789087319802aaada2e8534ccab0158slive >http://www.iana.org/assignments/media-types/index.html</a>. This
c14037646789087319802aaada2e8534ccab0158slive simplifies the <code>httpd.conf</code> file by providing the
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive majority of media-type definitions, and may be overridden by
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive <directive module="mod_mime">AddType</directive> directives as
c14037646789087319802aaada2e8534ccab0158slive needed. You should not edit the <code>mime.types</code> file,
c14037646789087319802aaada2e8534ccab0158slive because it may be replaced when you upgrade your server.</p>
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive <p>The file contains lines in the format of the arguments to
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive an <directive module="mod_mime">AddType</directive> directive:</p>
75159a79720160d33d888cf45481ef400c1e3a01nd <p>The case of the extension does not matter. Blank lines, and lines
75159a79720160d33d888cf45481ef400c1e3a01nd beginning with a hash character (<code>#</code>) are ignored.</p>
75159a79720160d33d888cf45481ef400c1e3a01nd Please do <strong>not</strong> send requests to the Apache HTTP
75159a79720160d33d888cf45481ef400c1e3a01nd Server Project to add any new entries in the distributed
75159a79720160d33d888cf45481ef400c1e3a01nd registered with IANA, and (2) they use widely accepted,
75159a79720160d33d888cf45481ef400c1e3a01nd non-conflicting filename extensions across platforms.
75159a79720160d33d888cf45481ef400c1e3a01nd <code>category/x-subtype</code> requests will be automatically
75159a79720160d33d888cf45481ef400c1e3a01nd rejected, as will any new two-letter extensions as they will
75159a79720160d33d888cf45481ef400c1e3a01nd likely conflict later with the already crowded language and
75159a79720160d33d888cf45481ef400c1e3a01nd character set namespace.
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</directivesynopsis>
75159a79720160d33d888cf45481ef400c1e3a01nd</modulesynopsis>