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