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