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