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