]> granicus.if.org Git - apache/blob - docs/manual/mod/mod_mime.html.en
transform update again...
[apache] / docs / manual / mod / mod_mime.html.en
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
4         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
5               This file is generated from xml source: DO NOT EDIT
6         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
7       --><title>mod_mime - Apache HTTP Server</title><link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /><link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /><link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link href="../images/favicon.ico" rel="shortcut icon" /></head><body><div id="page-header"><p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p><p class="apache">Apache HTTP Server Version 2.0</p><img alt="" src="../images/feather.gif" /></div><div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div><div id="path"><a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs-project/">Documentation</a> &gt; <a href="../">Version 2.0</a> &gt; <a href="./">Modules</a></div><div id="page-content"><div id="preamble"><h1>Apache Module mod_mime</h1><table class="module"><tr><th><a href="module-dict.html#Description">Description:
8                   </a></th><td>Associates the requested filename's extensions
9     with the file's behavior (handlers and filters)
10     and content (mime-type, language, character set and
11     encoding)</td></tr><tr><th><a href="module-dict.html#Status">Status:
12                   </a></th><td>Base</td></tr><tr><th><a href="module-dict.html#ModuleIdentifier">Module Identifier:
13                   </a></th><td>mime_module</td></tr><tr><th><a href="module-dict.html#SourceFile">Source File:
14                   </a></th><td>mod_mime.c</td></tr></table><h3>Summary</h3>
15     <p>This module is used to associate various bits of "meta
16     information" with files by their filename extensions. This
17     information relates the filename of the document to it's
18     mime-type, language, character set and encoding. This
19     information is sent to the browser, and participates in content
20     negotiation, so the user's preferences are respected when
21     choosing one of several possible files to serve. See
22     <code class="module"><a href="../mod/mod_negotiation.html">mod_negotiation</a></code> for more information
23     about content negotiation. </p>
24
25     <p>The directives <code class="directive"><a href="#addcharset">AddCharset</a></code>, <code class="directive"><a href="#addencoding">AddEncoding</a></code>, <code class="directive"><a href="#addlanguage">AddLanguage</a></code> and <code class="directive"><a href="#addtype">AddType</a></code> are all used to map file
26     extensions onto the meta-information for that file. Respectively
27     they set the character set, content-encoding, content-language,
28     and MIME-type (content-type) of documents.  The directive <code class="directive"><a href="#typesconfig">TypesConfig</a></code> is used to specify a
29     file which also maps extensions onto MIME types. </p>
30
31     <p>In addition, <code class="module"><a href="../mod/mod_mime.html">mod_mime</a></code> may define the <a href="../handler.html">handler</a> and <a href="../filter.html">filters</a> that originate and process
32     content.  The directives <code class="directive"><a href="#addhandler">AddHandler</a></code>, <code class="directive"><a href="#addoutputfilter">AddOutputFilter</a></code>, and <code class="directive"><a href="#addinputfilter">AddInputFilter</a></code> control the modules
33     or scripts that serve the document.  The <code class="directive"><a href="#multiviewsmatch">MultiviewsMatch</a></code> directive allows
34     <code class="module"><a href="../mod/mod_negotiation.html">mod_negotiation</a></code> to consider these file extensions
35     to be included when testing Multiviews matches.</p>
36
37     <p>While <code class="module"><a href="../mod/mod_mime.html">mod_mime</a></code> associates meta-information
38     with filename extensions, the <code class="module"><a href="../mod/core.html">core</a></code> server
39     provides directives that are used to associate all the files in a
40     given container (<em>e.g.</em>, <code class="directive"><a href="../mod/core.html#location">&lt;location&gt;</a></code>, <code class="directive"><a href="../mod/core.html#directory">&lt;directory&gt;</a></code>, or <code class="directive"><a href="../mod/core.html#files">&lt;Files&gt;</a></code>) with particular
41     meta-information. These directives include <code class="directive"><a href="../mod/core.html#forcetype">ForceType</a></code>, <code class="directive"><a href="../mod/core.html#sethandler">SetHandler</a></code>, <code class="directive"><a href="../mod/core.html#setinputfilter">SetInputFilter</a></code>, and <code class="directive"><a href="../mod/core.html#setoutputfilter">SetOutputFilter</a></code>.  The core directives
42     override any filename extension mappings defined in
43     <code class="module"><a href="../mod/mod_mime.html">mod_mime</a></code>.</p>
44
45     <p>Note that changing the meta-information for a file does not
46     change the value of the <code>Last-Modified</code> header.
47     Thus, previously cached copies may still be used by a client or
48     proxy, with the previous headers. If you change the
49     meta-information (language, content type, character set or
50     encoding) you may need to 'touch' affected files (updating
51     their last modified date) to ensure that all visitors are
52     receive the corrected content headers.</p>
53 </div><div id="quickview"><h3 class="directives">Directives</h3><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#addcharset">AddCharset</a></li><li><img alt="" src="../images/down.gif" /> <a href="#addencoding">AddEncoding</a></li><li><img alt="" src="../images/down.gif" /> <a href="#addhandler">AddHandler</a></li><li><img alt="" src="../images/down.gif" /> <a href="#addinputfilter">AddInputFilter</a></li><li><img alt="" src="../images/down.gif" /> <a href="#addlanguage">AddLanguage</a></li><li><img alt="" src="../images/down.gif" /> <a href="#addoutputfilter">AddOutputFilter</a></li><li><img alt="" src="../images/down.gif" /> <a href="#addtype">AddType</a></li><li><img alt="" src="../images/down.gif" /> <a href="#defaultlanguage">DefaultLanguage</a></li><li><img alt="" src="../images/down.gif" /> <a href="#modmimeusepathinfo">ModMimeUsePathInfo</a></li><li><img alt="" src="../images/down.gif" /> <a href="#multiviewsmatch">MultiviewsMatch</a></li><li><img alt="" src="../images/down.gif" /> <a href="#removecharset">RemoveCharset</a></li><li><img alt="" src="../images/down.gif" /> <a href="#removeencoding">RemoveEncoding</a></li><li><img alt="" src="../images/down.gif" /> <a href="#removehandler">RemoveHandler</a></li><li><img alt="" src="../images/down.gif" /> <a href="#removeinputfilter">RemoveInputFilter</a></li><li><img alt="" src="../images/down.gif" /> <a href="#removelanguage">RemoveLanguage</a></li><li><img alt="" src="../images/down.gif" /> <a href="#removeoutputfilter">RemoveOutputFilter</a></li><li><img alt="" src="../images/down.gif" /> <a href="#removetype">RemoveType</a></li><li><img alt="" src="../images/down.gif" /> <a href="#typesconfig">TypesConfig</a></li></ul><h3>Topics</h3><ul id="topics"><li><img alt="" src="../images/down.gif" /> <a href="#multipleext">Files with Multiple Extensions</a></li><li><img alt="" src="../images/down.gif" /> <a href="#contentencoding">Content encoding</a></li><li><img alt="" src="../images/down.gif" /> Character sets and languages</li></ul><h3>See also</h3><ul class="seealso"><li><code class="directive"><a href="../mod/mod_mime_magic.html#mimemagicfile">MimeMagicFile</a></code></li><li><code class="directive"><a href="../mod/core.html#adddefaultcharset">AddDefaultCharset</a></code></li><li><code class="directive"><a href="../mod/core.html#forcetype">ForceType</a></code></li><li><code class="directive"><a href="../mod/core.html#defaulttype">DefaultType</a></code></li><li><code class="directive"><a href="../mod/core.html#sethandler">SetHandler</a></code></li><li><code class="directive"><a href="../mod/core.html#setinputfilter">SetInputFilter</a></code></li><li><code class="directive"><a href="../mod/core.html#setoutputfilter">SetOutputFilter</a></code></li></ul></div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="section"><h2><a name="multipleext" id="multipleext">Files with Multiple Extensions</a></h2>
54
55
56     <p>Files can have more than one extension, and the order of the
57     extensions is <em>normally</em> irrelevant. For example, if the
58     file <code>welcome.html.fr</code> maps onto content type
59     text/html and language French then the file <code>welcome.fr.html</code> 
60     will map onto exactly the same information.  If more than one 
61     extension is given which maps onto the same
62     type of meta-information, then the one to the right will be
63     used. For example, if ".gif" maps to the MIME-type image/gif
64     and ".html" maps to the MIME-type text/html, then the file
65     <code>welcome.gif.html</code> will be associated with the
66     MIME-type "text/html".</p>
67
68     <p>Care should be taken when a file with multiple extensions
69     gets associated with both a MIME-type and a handler. This will
70     usually result in the request being by the module associated
71     with the handler. For example, if the <code>.imap</code>
72     extension is mapped to the handler "imap-file" (from mod_imap)
73     and the <code>.html</code> extension is mapped to the MIME-type
74     "text/html", then the file <code>world.imap.html</code> will be
75     associated with both the "imap-file" handler and "text/html"
76     MIME-type. When it is processed, the "imap-file" handler will
77     be used, and so it will be treated as a mod_imap imagemap
78     file.</p>
79 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="section"><h2><a name="contentencoding" id="contentencoding">Content encoding</a></h2>
80
81     <p>A file of a particular MIME type can additionally be encoded a
82     particular way to simplify transmission over the Internet.
83     While this usually will refer to compression, such as
84     <code>gzip</code>, it can also refer to encryption, such a
85     <code>pgp</code> or to an encoding such as UUencoding, which is
86     designed for transmitting a binary file in an ASCII (text)
87     format.</p>
88
89     <p>The MIME RFC puts it this way:</p>
90
91     <div class="note">
92       The Content-Encoding entity-header field is used as a
93       modifier to the media-type. When present, its value indicates
94       what additional content coding has been applied to the
95       resource, and thus what decoding mechanism must be applied in
96       order to obtain the media-type referenced by the Content-Type
97       header field. The Content-Encoding is primarily used to allow
98       a document to be compressed without losing the identity of
99       its underlying media type.
100     </div>
101
102     <p>By using more than one file extension (see <a href="#multipleext">section above about multiple file
103     extensions</a>), you can indicate that a file is of a
104     particular <em>type</em>, and also has a particular
105     <em>encoding</em>. </p>
106
107     <p>For example, you may have a file which is a Microsoft Word
108     document, which is pkzipped to reduce its size. If the
109     <code>.doc</code> extension is associated with the Microsoft
110     Word file type, and the <code>.zip</code> extension is
111     associated with the pkzip file encoding, then the file
112     <code>Resume.doc.zip</code>would be known to be a pkzip'ed Word
113     document.</p>
114
115     <p>Apache send a <code>Content-encoding</code> header with the
116     resource, in order to tell the client browser about the
117     encoding method.</p>
118
119     <div class="example"><p><code>Content-encoding: pkzip</code></p></div>
120
121 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="section"><h2>Character sets and languages</h2>
122
123
124
125     <p>In addition to file type and the file encoding,
126     another important piece of information is what language a
127     particular document is in, and in what character set the file
128     should be displayed. For example, the document might be written
129     in the Vietnamese alphabet, or in Cyrillic, and should be
130     displayed as such. This information, also, is transmitted in
131     HTTP headers.</p>
132
133     <p>The character set, language encoding and mime type are all 
134     used in the process of content negotiation (See 
135     <code class="module"><a href="../mod/mod_negotiation.html">mod_negotiation</a></code>) to determine
136     which document to give to the client, when there are
137     alternative documents in more than one character set, language, 
138     encoding or mime type.  All filename extensions associations
139     created with <code class="module"><a href="../mod/AddCharset.html">AddCharset</a></code>, <code class="module"><a href="../mod/AddEncoding.html">AddEncoding</a></code>, 
140     <code class="module"><a href="../mod/AddLanguage.html">AddLanguage</a></code> and <code class="module"><a href="../mod/AddType.html">AddType</a></code> directives
141     (and extensions listed in the <code class="module"><a href="../mod/MimeMagicFile.html">MimeMagicFile</a></code>)
142     participate in this select process.  Filename extensions that
143     are only associated using the <code class="module"><a href="../mod/AddHandler.html">AddHandler</a></code>,
144     <code class="module"><a href="../mod/AddInputFilter.html">AddInputFilter</a></code> or <code class="module"><a href="../mod/AddOutputFilter.html">AddOutputFilter</a></code>
145     directives may be included or excluded from matching by using 
146     the <code class="directive">MultiviewsMatch</code> directive.</p>
147
148 <h3>Charset</h3>
149
150
151     <p>To convey this further information, Apache optionally sends
152     a <code>Content-Language</code> header, to specify the language
153     that the document is in, and can append additional information
154     onto the <code>Content-Type</code> header to indicate the
155     particular character set that should be used to correctly
156     render the information.</p>
157
158 <div class="example"><p><code>
159 Content-Language: en, fr<br />
160 Content-Type: text/plain; charset=ISO-8859-2
161 </code></p></div>
162
163     <p>The language specification is the two-letter abbreviation
164     for the language. The <code>charset</code> is the name of the
165     particular character set which should be used.</p>
166
167 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="directive-section"><h2><a name="AddCharset" id="AddCharset">AddCharset</a> <a name="addcharset" id="addcharset">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description: 
168               </a></th><td>Maps the given filename extensions
169     to the specified content charset</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:
170               </a></th><td>AddCharset <em>charset extension</em> 
171 [<em>extension</em>] ...</td></tr><tr><th><a href="directive-dict.html#Context">Context:
172               </a></th><td>server config, virtual host, directory, .htaccess</td></tr><tr><th><a href="directive-dict.html#Override">Override:
173               </a></th><td>FileInfo</td></tr><tr><th><a href="directive-dict.html#Status">Status:
174               </a></th><td>Base</td></tr><tr><th><a href="directive-dict.html#Module">Module:
175               </a></th><td>mod_mime</td></tr><tr><th><a href="directive-dict.html#Compatibility">Compatibility:
176               </a></th><td>AddCharset is only available in Apache 
177 1.3.10 and later</td></tr></table>
178     
179     <p>The AddCharset directive maps the given filename extensions
180     to the specified content charset. <em>charset</em> is the MIME
181     charset parameter of filenames containing <em>extension</em>.
182     This mapping is added to any already in force, overriding any
183     mappings that already exist for the same <em>extension</em>.</p>
184
185     <p>Example:</p>
186 <div class="example"><p><code>
187     AddLanguage ja .ja<br />
188     AddCharset EUC-JP .euc<br />
189     AddCharset ISO-2022-JP .jis<br />
190     AddCharset SHIFT_JIS .sjis
191 </code></p></div>
192
193     <p>Then the document <code>xxxx.ja.jis</code> will be treated
194     as being a Japanese document whose charset is ISO-2022-JP (as
195     will the document <code>xxxx.jis.ja</code>). The AddCharset
196     directive is useful for both to inform the client about the
197     character encoding of the document so that the document can be
198     interpreted and displayed appropriately, and for <a href="../content-negotiation.html">content negotiation</a>,
199     where the server returns one from several documents based on
200     the client's charset preference.</p>
201
202     <p>The <em>extension</em> argument is case-insensitive, and can
203     be specified with or without a leading dot.</p>
204
205 <h3>See also</h3><ul><li><code class="module"><a href="../mod/mod_negotiation.html">mod_negotiation</a></code></li><li><code class="directive"><a href="../mod/core.html#adddefaultcharset">AddDefaultCharset</a></code></li></ul></div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="directive-section"><h2><a name="AddEncoding" id="AddEncoding">AddEncoding</a> <a name="addencoding" id="addencoding">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description: 
206               </a></th><td>Maps the given filename extensions
207     to the specified encoding type</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:
208               </a></th><td>AddEncoding
209     <em>MIME-enc extension</em> [<em>extension</em>] ...</td></tr><tr><th><a href="directive-dict.html#Context">Context:
210               </a></th><td>server config, virtual host, directory, .htaccess</td></tr><tr><th><a href="directive-dict.html#Override">Override:
211               </a></th><td>FileInfo</td></tr><tr><th><a href="directive-dict.html#Status">Status:
212               </a></th><td>Base</td></tr><tr><th><a href="directive-dict.html#Module">Module:
213               </a></th><td>mod_mime</td></tr></table>
214
215     <p>The AddEncoding directive maps the given filename extensions
216     to the specified encoding type. <em>MIME-enc</em> is the MIME
217     encoding to use for documents containing the
218     <em>extension</em>. This mapping is added to any already in
219     force, overriding any mappings that already exist for the same
220     <em>extension</em>. Example:</p>
221
222     <div class="example"><p><code>
223       AddEncoding x-gzip .gz<br />
224       AddEncoding x-compress .Z
225     </code></p></div>
226
227     <p>This will cause filenames containing the .gz extension to be
228     marked as encoded using the x-gzip encoding, and filenames
229     containing the .Z extension to be marked as encoded with
230     x-compress. </p>
231
232     <p>Old clients expect <code>x-gzip</code> and
233     <code>x-compress</code>, however the standard dictates that
234     they're equivalent to <code>gzip</code> and
235     <code>compress</code> respectively. Apache does content
236     encoding comparisons by ignoring any leading <code>x-</code>.
237     When responding with an encoding Apache will use whatever form
238     (<em>i.e.</em>, <code>x-foo</code> or <code>foo</code>) the
239     client requested. If the client didn't specifically request a
240     particular form Apache will use the form given by the
241     <code>AddEncoding</code> directive. To make this long story
242     short, you should always use <code>x-gzip</code> and
243     <code>x-compress</code> for these two specific encodings. More
244     recent encodings, such as <code>deflate</code> should be
245     specified without the <code>x-</code>.</p>
246
247     <p>The <em>extension</em> argument is case-insensitive, and can
248     be specified with or without a leading dot.</p>
249
250 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="directive-section"><h2><a name="AddHandler" id="AddHandler">AddHandler</a> <a name="addhandler" id="addhandler">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description: 
251               </a></th><td>Maps the filename extensions
252 to the specified handler</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:
253               </a></th><td>AddHandler
254     <em>handler-name extension</em> [<em>extension</em>] ...</td></tr><tr><th><a href="directive-dict.html#Context">Context:
255               </a></th><td>server config, virtual host, directory, .htaccess</td></tr><tr><th><a href="directive-dict.html#Override">Override:
256               </a></th><td>FileInfo</td></tr><tr><th><a href="directive-dict.html#Status">Status:
257               </a></th><td>Base</td></tr><tr><th><a href="directive-dict.html#Module">Module:
258               </a></th><td>mod_mime</td></tr></table>
259 <p>Files having the name <em>extension</em> will be served by the
260 specified <a href="../handler.html">handler-name</a>.  This mapping is
261 added to any already in force, overriding any mappings that already
262 exist for the same <em>extension</em>. For example, to activate CGI
263 scripts with the file extension "<code>.cgi</code>", you might
264 use:</p>
265
266 <div class="example"><p><code>
267     AddHandler cgi-script .cgi
268 </code></p></div>
269
270     <p>Once that has been put into your srm.conf or httpd.conf
271     file, any file containing the "<code>.cgi</code>" extension
272     will be treated as a CGI program.</p>
273
274     <p>The <em>extension</em> argument is case-insensitive, and can
275     be specified with or without a leading dot.</p>
276
277 <h3>See also</h3><ul><li><code class="directive"><a href="../mod/core.html#sethandler">SetHandler</a></code></li></ul></div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="directive-section"><h2><a name="AddInputFilter" id="AddInputFilter">AddInputFilter</a> <a name="addinputfilter" id="addinputfilter">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description: 
278               </a></th><td>Maps filename extensions
279     to the filters that will process
280     client requests</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:
281               </a></th><td>AddInputFilter
282     <em>filter</em>[<em>;filter</em>...] extension
283     [<em>extension</em> ...]</td></tr><tr><th><a href="directive-dict.html#Context">Context:
284               </a></th><td>server config, virtual host, directory, .htaccess</td></tr><tr><th><a href="directive-dict.html#Status">Status:
285               </a></th><td>Base</td></tr><tr><th><a href="directive-dict.html#Module">Module:
286               </a></th><td>mod_mime</td></tr><tr><th><a href="directive-dict.html#Compatibility">Compatibility:
287               </a></th><td>AddInputFilter
288     is only available in Apache 2.0.26 and later.</td></tr></table>
289
290     <p>AddInputFilter maps the filename extensions <em>extension</em>
291     to the <a href="../filter.html">filters</a> which will process
292     client requests and POST input when they are received by the
293     server. This is in addition to any filters defined elsewhere,
294     including the <a href="core.html#setinputfilter">SetInputFilter</a> directive.
295     This mapping is merged over any already in force, overriding any
296     mappings that already exist for the same <em>extension</em>.</p>
297
298     <p>If more than one filter is specified, they must be separated
299     by semicolons in the order in which they should process the
300     content. Both the filter and <em>extension</em> arguments are
301     case-insensitive, and the extension may be specified with or
302     without a leading dot.</p>
303
304 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="directive-section"><h2><a name="AddLanguage" id="AddLanguage">AddLanguage</a> <a name="addlanguage" id="addlanguage">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description: 
305               </a></th><td>Maps the given filename extension
306 to the specified content language</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:
307               </a></th><td>AddLanguage
308     <em>MIME-lang extension</em> [<em>extension</em>] ...</td></tr><tr><th><a href="directive-dict.html#Context">Context:
309               </a></th><td>server config, virtual host, directory, .htaccess</td></tr><tr><th><a href="directive-dict.html#Override">Override:
310               </a></th><td>FileInfo</td></tr><tr><th><a href="directive-dict.html#Status">Status:
311               </a></th><td>Base</td></tr><tr><th><a href="directive-dict.html#Module">Module:
312               </a></th><td>mod_mime</td></tr></table>
313
314     <p>The AddLanguage directive maps the given filename extension
315     to the specified content language. <em>MIME-lang</em> is the
316     MIME language of filenames containing <em>extension</em>. This
317     mapping is added to any already in force, overriding any
318     mappings that already exist for the same
319     <em>extension</em>.</p>
320
321     <p>Example:</p>
322
323     <div class="example"><p><code>
324       AddEncoding x-compress .Z<br />
325        AddLanguage en .en<br />
326        AddLanguage fr .fr
327     </code></p></div>
328
329     <p>Then the document <code>xxxx.en.Z</code> will be treated as
330     being a compressed English document (as will the document
331     <code>xxxx.Z.en</code>). Although the content language is
332     reported to the client, the browser is unlikely to use this
333     information. The AddLanguage directive is more useful for <a href="../content-negotiation.html">content negotiation</a>,
334     where the server returns one from several documents based on
335     the client's language preference.</p>
336
337     <p>If multiple language assignments are made for the same
338     extension, the last one encountered is the one that is used.
339     That is, for the case of:</p>
340
341 <div class="example"><p><code>
342     AddLanguage en .en<br />
343     AddLanguage en-uk .en<br />
344     AddLanguage en-us .en
345 </code></p></div>
346
347     <p>documents with the extension "<code>.en</code>" would be
348     treated as being "<code>en-us</code>".</p>
349
350     <p>The <em>extension</em> argument is case-insensitive, and can
351     be specified with or without a leading dot.</p>
352
353 <h3>See also</h3><ul><li><code class="module"><a href="../mod/mod_negotiation.html">mod_negotiation</a></code></li></ul></div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="directive-section"><h2><a name="AddOutputFilter" id="AddOutputFilter">AddOutputFilter</a> <a name="addoutputfilter" id="addoutputfilter">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description: 
354               </a></th><td>maps the filename
355 extensions to the filters that will process
356 responses from the server</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:
357               </a></th><td>AddOutputFilter
358     <em>filter</em>[<em>;filter</em>...] extension
359     [<em>extension</em> ...]</td></tr><tr><th><a href="directive-dict.html#Context">Context:
360               </a></th><td>server config, virtual host, directory, .htaccess</td></tr><tr><th><a href="directive-dict.html#Override">Override:
361               </a></th><td /></tr><tr><th><a href="directive-dict.html#Status">Status:
362               </a></th><td>Base</td></tr><tr><th><a href="directive-dict.html#Module">Module:
363               </a></th><td>mod_mime</td></tr><tr><th><a href="directive-dict.html#Compatibility">Compatibility:
364               </a></th><td>AddOutputFilter
365     is only available in Apache 2.0.26 and later.</td></tr></table>
366
367     <p>The <code class="directive">AddOutputFilter</code> directive maps the
368     filename extensions <em>extension</em> to the <a href="../filter.html">filters</a> which will process responses
369     from the server before they are sent to the client.  This is in
370     addition to any filters defined elsewhere, including the
371     <code class="directive"><a href="../mod/core.html#setoutputfilter">SetOutputFilter</a></code>
372     directive. This mapping is merged over any already in force,
373     overriding any mappings that already exist for the same
374     <em>extension</em>.</p>
375
376     <p>For example, the following configuration will process all
377     .shtml files for server-side includes and will then compress
378     the output using <code class="module"><a href="../mod/mod_deflate.html">mod_deflate</a></code>.</p>
379      
380
381     <div class="example"><p><code>
382       AddOutputFilter INCLUDES;DEFLATE shtml
383     </code></p></div>
384
385     <p>If more than one filter is specified, they must be separated
386     by semicolons in the order in which they should process the
387     content. Both the filter and <em>extension</em> arguments are
388     case-insensitive, and the extension may be specified with or
389     without a leading dot.</p>
390
391 <h3>See also</h3><ul><li><code class="directive"><a href="#removeoutputfilter">RemoveOutputFilter</a></code></li></ul></div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="directive-section"><h2><a name="AddType" id="AddType">AddType</a> <a name="addtype" id="addtype">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description: 
392               </a></th><td>Maps the given filename extensions
393 onto the specified content type</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:
394               </a></th><td>AddType <em>MIME-type
395     extension</em> [<em>extension</em>] ...</td></tr><tr><th><a href="directive-dict.html#Context">Context:
396               </a></th><td>server config, virtual host, directory, .htaccess</td></tr><tr><th><a href="directive-dict.html#Override">Override:
397               </a></th><td>FileInfo</td></tr><tr><th><a href="directive-dict.html#Status">Status:
398               </a></th><td>Base</td></tr><tr><th><a href="directive-dict.html#Module">Module:
399               </a></th><td>mod_mime</td></tr></table>
400
401     <p>The AddType directive maps the given filename extensions onto
402     the specified content type. <em>MIME-type</em> is the MIME type to
403     use for filenames containing <em>extension</em>. This mapping is
404     added to any already in force, overriding any mappings that
405     already exist for the same <em>extension</em>.  This directive can
406     be used to add mappings not listed in the MIME types file (see the
407     <code class="directive"><a href="#typesconfig">TypesConfig</a></code>
408     directive).</p>
409     
410     <p>Example:</p>
411
412     <div class="example"><p><code>
413       AddType image/gif .gif
414     </code></p></div>
415
416     <div class="note">It is recommended that new MIME types be added using the
417     AddType directive rather than changing the 
418     <code class="directive">TypesConfig</code> file. </div>
419
420     <p>The <em>extension</em> argument is case-insensitive, and can
421     be specified with or without a leading dot.</p>
422
423 <h3>See also</h3><ul><li><code class="directive"><a href="../mod/core.html#defaulttype">DefaultType</a></code></li><li><code class="directive"><a href="../mod/core.html#forcetype">ForceType</a></code></li></ul></div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="directive-section"><h2><a name="DefaultLanguage" id="DefaultLanguage">DefaultLanguage</a> <a name="defaultlanguage" id="defaultlanguage">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description: 
424               </a></th><td>Sets all files in the given scope to the 
425 specified language</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:
426               </a></th><td>DefaultLanguage
427     <em>MIME-lang</em></td></tr><tr><th><a href="directive-dict.html#Context">Context:
428               </a></th><td>server config, virtual host, directory, .htaccess</td></tr><tr><th><a href="directive-dict.html#Override">Override:
429               </a></th><td>FileInfo</td></tr><tr><th><a href="directive-dict.html#Status">Status:
430               </a></th><td>Base</td></tr><tr><th><a href="directive-dict.html#Module">Module:
431               </a></th><td>mod_mime</td></tr><tr><th><a href="directive-dict.html#Compatibility">Compatibility:
432               </a></th><td>DefaultLanguage
433     is only available in Apache 1.3.4 and later.</td></tr></table>
434
435     <p>The DefaultLanguage directive tells Apache that all files in
436     the directive's scope (<em>e.g.</em>, all files covered by the
437     current <code>&lt;Directory&gt;</code> container) that don't
438     have an explicit language extension (such as <code>.fr</code>
439     or <code>.de</code> as configured by <code>AddLanguage</code>)
440     should be considered to be in the specified <em>MIME-lang</em>
441     language. This allows entire directories to be marked as
442     containing Dutch content, for instance, without having to
443     rename each file. Note that unlike using extensions to specify
444     languages, <code>DefaultLanguage</code> can only specify a
445     single language.</p>
446
447     <p>If no <code>DefaultLanguage</code> directive is in force,
448     and a file does not have any language extensions as configured
449     by <code>AddLanguage</code>, then that file will be considered
450     to have no language attribute.</p>
451
452 <div class="example"><h3>Example</h3><p><code>
453 DefaultLanguage en
454 </code></p></div>
455
456 <h3>See also</h3><ul><li><code class="module"><a href="../mod/mod_negotiation.html">mod_negotiation</a></code></li></ul></div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="directive-section"><h2><a name="ModMimeUsePathInfo" id="ModMimeUsePathInfo">ModMimeUsePathInfo</a> <a name="modmimeusepathinfo" id="modmimeusepathinfo">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description: 
457               </a></th><td>Tells mod_mime to treat path_info components as part of the filename</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:
458               </a></th><td>ModMimeUsePathInfo On|Off</td></tr><tr><th><a href="directive-dict.html#Context">Context:
459               </a></th><td>server config, virtual host, directory, location, .htaccess</td></tr><tr><th><a href="directive-dict.html#Override">Override:
460               </a></th><td>FileInfo</td></tr><tr><th><a href="directive-dict.html#Status">Status:
461               </a></th><td>Base</td></tr><tr><th><a href="directive-dict.html#Module">Module:
462               </a></th><td>mod_mime</td></tr><tr><th><a href="directive-dict.html#Compatibility">Compatibility:
463               </a></th><td>Available in Apache 2.0.41 and later</td></tr></table>
464
465   <p>The ModMimeUsePathInfo directive is used to combine the filename with
466      the path_info URL component to apply mod_mime's directives to the
467      request.  The default value is 'Off' - therefore, the path_info
468      component is ignored.
469   </p>
470
471   <p>This directive is recommended when you have a virtual filesystem.</p>
472
473 <div class="example"><h3>Example</h3><p><code>
474
475 ModMimeUsePathInfo On
476 </code></p></div>
477
478   <p>If you have a request for /bar/foo.shtml where /bar is a Location and
479      ModMimeUsePathInfo is on, mod_mime will treat the incoming request as
480      /bar/foo.shtml and directives like
481      <code>AddOutputFilter INCLUDES .shtml</code> will add the INCLUDES
482      filter to the request.  If ModMimeUsePathInfo is not set, the includes
483      filter will not be added.
484   </p>
485
486 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="directive-section"><h2><a name="MultiviewsMatch" id="MultiviewsMatch">MultiviewsMatch</a> <a name="multiviewsmatch" id="multiviewsmatch">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description: 
487               </a></th><td>The types of files that will be included when 
488 searching for a matching file with MultiViews</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:
489               </a></th><td>MultiviewsMatch
490     <em>[NegotiatedOnly] [Handlers] [Filters] [Any]</em></td></tr><tr><th><a href="directive-dict.html#Context">Context:
491               </a></th><td>server config, virtual host, directory, .htaccess</td></tr><tr><th><a href="directive-dict.html#Override">Override:
492               </a></th><td>FileInfo</td></tr><tr><th><a href="directive-dict.html#Status">Status:
493               </a></th><td>Base</td></tr><tr><th><a href="directive-dict.html#Module">Module:
494               </a></th><td>mod_mime</td></tr><tr><th><a href="directive-dict.html#Compatibility">Compatibility:
495               </a></th><td>Available 
496     in Apache 2.0.26 and later.</td></tr></table>
497
498     <p>MultiviewsMatch permits three different behaviors for
499     <a href="mod_negotiation.html">mod_negotiation</a>'s Multiviews 
500     feature.  Multiviews allows a request for a file, e.g. index.html,
501     to match any negotiated extensions following the base request,
502     e.g. index.html.en, index.html.fr, or index.html.gz.</p>
503
504     <p>The NegotiatedOnly option provides that every extension following
505     the base name must correlate to a recognized mod_mime extension for
506     content negotation, e.g. Charset, Content-Type, Language, or 
507     Encoding.  This is the strictest implementation with the fewest
508     unexpected side effects, and is the default behavior.</p>
509
510     <p>To include extensions associated with Handlers and/or Filters,
511     set the MultiviewsMatch directive to either Handlers, Filters, or
512     both option keywords.  If all other factors are equal, the smallest
513     file will be served, e.g. in deciding between index.html.cgi of 500
514     characters and index.html.pl of 1000 bytes, the .cgi file would win
515     in this example.  Users of .asis files might prefer to use the
516     Handler option, if .asis files are associated with the asis-handler.</p>
517
518     <p>You may finally allow Any extensions to match, even if mod_mime 
519     doesn't recognize the extension.  This was the behavior in Apache 1.3,
520     and can cause unpredicatable results, such as serving .old or .bak
521     files the webmaster never expected to be served.</p>
522
523     <p>For example, the following configuration will allow handlers
524     and filters to participate in Multviews, but will exclude unknown
525     files:</p>
526 <div class="example"><p><code>
527 MultiviewsMatch Handlers Filters
528 </code></p></div>
529
530 <h3>See also</h3><ul><li><code class="directive"><a href="../mod/core.html#options">Options</a></code></li></ul></div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="directive-section"><h2><a name="RemoveCharset" id="RemoveCharset">RemoveCharset</a> <a name="removecharset" id="removecharset">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description: 
531               </a></th><td>Removes any character set associations for a set of file
532 extensions</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:
533               </a></th><td>RemoveCharset
534     <em>extension</em> [<em>extension</em>] ...</td></tr><tr><th><a href="directive-dict.html#Context">Context:
535               </a></th><td>virtual host, directory, .htaccess</td></tr><tr><th><a href="directive-dict.html#Status">Status:
536               </a></th><td>Base</td></tr><tr><th><a href="directive-dict.html#Module">Module:
537               </a></th><td>mod_mime</td></tr><tr><th><a href="directive-dict.html#Compatibility">Compatibility:
538               </a></th><td>RemoveCharset is
539     only available in Apache 2.0.24 and later.</td></tr></table>
540     <p>The <code>RemoveCharset</code> directive removes any
541     character set associations for files with the given extensions.
542     This allows <code>.htaccess</code> files in subdirectories to
543     undo any associations inherited from parent directories or the
544     server config files.</p>
545
546     <p>The <em>extension</em> argument is case-insensitive, and can
547     be specified with or without a leading dot.</p>
548
549 <div class="example"><h3>Example</h3><p><code>
550 RemoveCharset .html .shtml
551 </code></p></div>
552
553 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="directive-section"><h2><a name="RemoveEncoding" id="RemoveEncoding">RemoveEncoding</a> <a name="removeencoding" id="removeencoding">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description: 
554               </a></th><td>Removes any content encoding associations for a set of file
555 extensions</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:
556               </a></th><td>RemoveEncoding
557     <em>extension</em> [<em>extension</em>] ...</td></tr><tr><th><a href="directive-dict.html#Context">Context:
558               </a></th><td>virtual host, directory, .htaccess</td></tr><tr><th><a href="directive-dict.html#Status">Status:
559               </a></th><td>Base</td></tr><tr><th><a href="directive-dict.html#Module">Module:
560               </a></th><td>mod_mime</td></tr><tr><th><a href="directive-dict.html#Compatibility">Compatibility:
561               </a></th><td>RemoveEncoding
562     is only available in Apache 1.3.13 and later.</td></tr></table>
563
564     <p>The <code>RemoveEncoding</code> directive removes any
565     encoding associations for files with the given extensions. This
566     allows <code>.htaccess</code> files in subdirectories to undo
567     any associations inherited from parent directories or the
568     server config files. An example of its use might be:</p>
569
570
571 <div class="example"><h3>/foo/.htaccess:</h3><pre>
572 AddEncoding x-gzip .gz
573 AddType text/plain .asc
574 &lt;Files *.gz.asc&gt;
575   RemoveEncoding .gz
576 &lt;/Files&gt;
577 </pre></div>
578
579     <p>This will cause <code>foo.gz</code> to be marked as being
580     encoded with the gzip method, but <code>foo.gz.asc</code> as an
581     unencoded plaintext file.</p>
582
583     <p><strong>Note:</strong>RemoveEncoding directives are processed
584     <em>after</em> any AddEncoding directives, so it is possible they
585     may undo the effects of the latter if both occur within the
586     same directory configuration.</p>
587
588     <p>The <em>extension</em> argument is case-insensitive, and can
589     be specified with or without a leading dot.</p>
590 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="directive-section"><h2><a name="RemoveHandler" id="RemoveHandler">RemoveHandler</a> <a name="removehandler" id="removehandler">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description: 
591               </a></th><td>Removes any handler associations for a set of file
592 extensions</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:
593               </a></th><td>RemoveHandler
594     <em>extension</em> [<em>extension</em>] ...</td></tr><tr><th><a href="directive-dict.html#Context">Context:
595               </a></th><td>virtual host, directory, .htaccess</td></tr><tr><th><a href="directive-dict.html#Status">Status:
596               </a></th><td>Base</td></tr><tr><th><a href="directive-dict.html#Module">Module:
597               </a></th><td>mod_mime</td></tr><tr><th><a href="directive-dict.html#Compatibility">Compatibility:
598               </a></th><td>RemoveHandler is
599     only available in Apache 1.3.4 and later.</td></tr></table>
600
601     <p>The <code>RemoveHandler</code> directive removes any handler
602     associations for files with the given extensions. This allows
603     <code>.htaccess</code> files in subdirectories to undo any
604     associations inherited from parent directories or the server
605     config files. An example of its use might be:</p>
606
607 <div class="example"><h3>/foo/.htaccess:</h3><p><code>
608 AddHandler server-parsed .html
609 </code></p></div>
610
611 <div class="example"><h3>/foo/bar/.htaccess:</h3><p><code>
612 RemoveHandler .html
613 </code></p></div>
614
615     <p>This has the effect of returning <code>.html</code> files in
616     the <code>/foo/bar</code> directory to being treated as normal
617     files, rather than as candidates for parsing (see the <a href="mod_include.html"><code>mod_include</code></a>
618     module).</p>
619
620     <p>The <em>extension</em> argument is case-insensitive, and can
621     be specified with or without a leading dot.</p>
622 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="directive-section"><h2><a name="RemoveInputFilter" id="RemoveInputFilter">RemoveInputFilter</a> <a name="removeinputfilter" id="removeinputfilter">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description: 
623               </a></th><td>Removes any input filter associations for a set of file
624 extensions</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:
625               </a></th><td>RemoveInputFilter
626     <em>extension</em> [<em>extension</em>] ...</td></tr><tr><th><a href="directive-dict.html#Context">Context:
627               </a></th><td>virtual host, directory, .htaccess</td></tr><tr><th><a href="directive-dict.html#Status">Status:
628               </a></th><td>Base</td></tr><tr><th><a href="directive-dict.html#Module">Module:
629               </a></th><td>mod_mime</td></tr><tr><th><a href="directive-dict.html#Compatibility">Compatibility:
630               </a></th><td>RemoveInputFilter is only available in Apache 
631 2.0.26 and later.</td></tr></table>   
632
633     <p>The <code>RemoveInputFilter</code> directive removes any
634     input filter associations for files with the given extensions.
635     This allows <code>.htaccess</code> files in subdirectories to
636     undo any associations inherited from parent directories or the
637     server config files.</p>
638
639     <p>The <em>extension</em> argument is case-insensitive, and can
640     be specified with or without a leading dot.</p>
641
642 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="directive-section"><h2><a name="RemoveLanguage" id="RemoveLanguage">RemoveLanguage</a> <a name="removelanguage" id="removelanguage">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description: 
643               </a></th><td>Removes any language associations for a set of file
644 extensions</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:
645               </a></th><td>RemoveLanguage
646     <em>extension</em> [<em>extension</em>] ...</td></tr><tr><th><a href="directive-dict.html#Context">Context:
647               </a></th><td>virtual host, directory, .htaccess</td></tr><tr><th><a href="directive-dict.html#Status">Status:
648               </a></th><td>Base</td></tr><tr><th><a href="directive-dict.html#Module">Module:
649               </a></th><td>mod_mime</td></tr><tr><th><a href="directive-dict.html#Compatibility">Compatibility:
650               </a></th><td>RemoveLanguage
651     is only available in Apache 2.0.24 and later.</td></tr></table>
652
653     <p>The <code>RemoveLanguage</code> directive removes any
654     language associations for files with the given extensions. This
655     allows <code>.htaccess</code> files in subdirectories to undo
656     any associations inherited from parent directories or the
657     server config files.</p>
658
659     <p>The <em>extension</em> argument is case-insensitive, and can
660     be specified with or without a leading dot.</p>
661 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="directive-section"><h2><a name="RemoveOutputFilter" id="RemoveOutputFilter">RemoveOutputFilter</a> <a name="removeoutputfilter" id="removeoutputfilter">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description: 
662               </a></th><td>Removes any output filter associations for a set of file
663 extensions</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:
664               </a></th><td>RemoveOutputFilter
665     <em>extension</em> [<em>extension</em>] ...</td></tr><tr><th><a href="directive-dict.html#Context">Context:
666               </a></th><td>virtual host, directory, .htaccess</td></tr><tr><th><a href="directive-dict.html#Override">Override:
667               </a></th><td /></tr><tr><th><a href="directive-dict.html#Status">Status:
668               </a></th><td>Base</td></tr><tr><th><a href="directive-dict.html#Module">Module:
669               </a></th><td>mod_mime</td></tr><tr><th><a href="directive-dict.html#Compatibility">Compatibility:
670               </a></th><td>RemoveOutputFilter is only available in Apache 
671 2.0.26 and later.</td></tr></table>    
672
673     <p>The <code>RemoveOutputFilter</code> directive removes any
674     output filter associations for files with the given extensions.
675     This allows <code>.htaccess</code> files in subdirectories to
676     undo any associations inherited from parent directories or the
677     server config files.</p>
678
679     <p>The <em>extension</em> argument is case-insensitive, and can
680     be specified with or without a leading dot.</p>
681
682     <div class="example"><h3>Example</h3><p><code>
683     RemoveOutputFilter shtml
684     </code></p></div>
685 <h3>See also</h3><ul><li><code class="directive"><a href="#addoutputfilter">AddOutputFilter</a></code></li></ul></div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="directive-section"><h2><a name="RemoveType" id="RemoveType">RemoveType</a> <a name="removetype" id="removetype">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description: 
686               </a></th><td>Removes any content type associations for a set of file
687 extensions</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:
688               </a></th><td>RemoveType
689     <em>extension</em> [<em>extension</em>] ...</td></tr><tr><th><a href="directive-dict.html#Context">Context:
690               </a></th><td>virtual host, directory, .htaccess</td></tr><tr><th><a href="directive-dict.html#Override">Override:
691               </a></th><td /></tr><tr><th><a href="directive-dict.html#Status">Status:
692               </a></th><td>Base</td></tr><tr><th><a href="directive-dict.html#Module">Module:
693               </a></th><td>mod_mime</td></tr><tr><th><a href="directive-dict.html#Compatibility">Compatibility:
694               </a></th><td>RemoveType is
695     only available in Apache 1.3.13 and later.</td></tr></table>
696     <p>The <code class="directive">RemoveType</code> directive removes any MIME type
697     associations for files with the given extensions. This allows
698     <code>.htaccess</code> files in subdirectories to undo any
699     associations inherited from parent directories or the server
700     config files. An example of its use might be:</p>
701
702 <div class="example"><h3>/foo/.htaccess:</h3><p><code>
703 RemoveType .cgi
704 </code></p></div>
705
706     <p>This will remove any special handling of <code>.cgi</code>
707     files in the <code>/foo/</code> directory and any beneath it,
708     causing the files to be treated as being of the <a href="core.html#defaulttype">default type</a>.</p>
709
710     <div class="note"><strong>Note:</strong><code class="directive">RemoveType</code> directives
711     are processed <em>after</em> any <code class="directive">AddType</code>
712     directives, so it is possible they may undo the effects of the
713     latter if both occur within the same directory
714     configuration.</div>
715
716     <p>The <em>extension</em> argument is case-insensitive, and can
717     be specified with or without a leading dot.</p>
718 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div><div class="directive-section"><h2><a name="TypesConfig" id="TypesConfig">TypesConfig</a> <a name="typesconfig" id="typesconfig">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description: 
719               </a></th><td>The location of the mime.types file</td></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:
720               </a></th><td>TypesConfig <em>file-path</em></td></tr><tr><th><a href="directive-dict.html#Default">Default: 
721               </a></th><td><code>TypesConfig conf/mime.types</code></td></tr><tr><th><a href="directive-dict.html#Context">Context:
722               </a></th><td>server config</td></tr><tr><th><a href="directive-dict.html#Status">Status:
723               </a></th><td>Base</td></tr><tr><th><a href="directive-dict.html#Module">Module:
724               </a></th><td>mod_mime</td></tr></table>
725
726     <p>The TypesConfig directive sets the location of the MIME types
727     configuration file. <em>Filename</em> is relative to the <a href="core.html#serverroot">ServerRoot</a>. This file sets the
728     default list of mappings from filename extensions to content
729     types. Most administrators use the provided
730     <code>mime.types</code> file, which associates common filename
731     extensions with IANA registered content types. The current list is
732     maintained at
733     <code>http://www.isi.edu/in-notes/iana/assignments/media-types/media-types</code>. This
734     simplifies the <code>httpd.conf</code> file by providing the
735     majority of media-type definitions, and may be overridden by
736     <code class="directive"><a href="#addtype">AddType</a></code> directives as
737     needed.  You should not edit the <code>mime.types</code> file,
738     because it may be replaced when you upgrade your server.</p>
739    
740     <p>The file contains lines in the format of the arguments to
741     an <code class="directive"><a href="#addtype">AddType</a></code> directive:</p>
742
743     <div class="example"><p><code>
744       MIME-type extension extension ...
745     </code></p></div>
746
747     <p>
748     The case of the extension does not matter. Blank lines, and lines
749     beginning with a hash character (`#') are ignored. </p>
750
751     <div class="note">Please do not send requests to the Apache HTTP Server Project
752     to add any new entries in the distributed mime.types file
753     unless (1) they are already registered with IANA, and (2) they
754     use widely accepted, non-conflicting filename extensions across
755     platforms. category/x-subtype requests will be automatically
756     rejected, as will any new two-letter extensions as they will
757     likely conflict later with the already crowded language and
758     character set namespace.</div>
759
760 <h3>See also</h3><ul><li><code class="module"><a href="../mod/mod_mime_magic.html">mod_mime_magic</a></code></li></ul></div></div><div id="footer"><p class="apache">Maintained by the <a href="http://httpd.apache.org/docs-project/">Apache HTTP Server Documentation Project</a></p><p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div></body></html>