2 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
3 <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
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>
12 <sourcefile>mod_mime.c</sourcefile>
13 <identifier>mime_module</identifier>
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>
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>
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>
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>
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>
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>
84 <section id="multipleext">
85 <title>Files with Multiple Extensions</title>
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>
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
112 <section id="contentencoding"><title>Content encoding</title>
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)
122 <p>The MIME RFC puts it this way:</p>
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.
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>
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
149 <p>Apache send a <code>Content-encoding</code> header with the
150 resource, in order to tell the client browser about the
153 <example>Content-encoding: pkzip</example>
159 <title>Character sets and languages</title>
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
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>
185 <title>Charset</title>
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>
195 Content-Language: en, fr<br />
196 Content-Type: text/plain; charset=ISO-8859-2
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>
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>
213 <context>server config</context>
214 <context>virtual host</context>
215 <context>directory</context>
216 <context>.htaccess</context>
218 <override>FileInfo</override>
219 <compatibility>AddCharset is only available in Apache
220 1.3.10 and later</compatibility>
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>
232 AddLanguage ja .ja<br />
233 AddCharset EUC-JP .euc<br />
234 AddCharset ISO-2022-JP .jis<br />
235 AddCharset SHIFT_JIS .sjis
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>
248 <p>The <em>extension</em> argument is case-insensitive, and can
249 be specified with or without a leading dot.</p>
252 <seealso><module>mod_negotiation</module></seealso>
253 <seealso><directive module="core">AddDefaultCharset</directive></seealso>
258 <name>AddEncoding</name>
259 <description>Maps the given filename extensions
260 to the specified encoding type</description>
262 <em>MIME-enc extension</em> [<em>extension</em>] ...</syntax>
264 <context>server config</context>
265 <context>virtual host</context>
266 <context>directory</context>
267 <context>.htaccess</context>
269 <override>FileInfo</override>
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>
282 AddEncoding x-gzip .gz<br />
283 AddEncoding x-compress .Z
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
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>
306 <p>The <em>extension</em> argument is case-insensitive, and can
307 be specified with or without a leading dot.</p>
313 <name>AddHandler</name>
314 <description>Maps the filename extensions
315 to the specified handler</description>
317 <em>handler-name extension</em> [<em>extension</em>] ...</syntax>
319 <context>server config</context>
320 <context>virtual host</context>
321 <context>directory</context>
322 <context>.htaccess</context>
324 <override>FileInfo</override>
325 <compatibility></compatibility>
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
336 AddHandler cgi-script .cgi
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>
343 <p>The <em>extension</em> argument is case-insensitive, and can
344 be specified with or without a leading dot.</p>
347 <seealso><directive module="core">SetHandler</directive></seealso>
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>
359 <context>server config</context>
360 <context>virtual host</context>
361 <context>directory</context>
362 <context>.htaccess</context>
364 <compatibility>AddInputFilter
365 is only available in Apache 2.0.26 and later.</compatibility>
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,
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>
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>
390 <name>AddLanguage</name>
391 <description>Maps the given filename extension
392 to the specified content language</description>
394 <em>MIME-lang extension</em> [<em>extension</em>] ...</syntax>
396 <context>server config</context>
397 <context>virtual host</context>
398 <context>directory</context>
399 <context>.htaccess</context>
401 <override>FileInfo</override>
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>
415 AddEncoding x-compress .Z<br />
416 AddLanguage en .en<br />
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>
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>
434 AddLanguage en .en<br />
435 AddLanguage en-uk .en<br />
436 AddLanguage en-us .en
439 <p>documents with the extension "<code>.en</code>" would be
440 treated as being "<code>en-us</code>".</p>
442 <p>The <em>extension</em> argument is case-insensitive, and can
443 be specified with or without a leading dot.</p>
446 <seealso><module>mod_negotiation</module></seealso>
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>
458 <context>server config</context>
459 <context>virtual host</context>
460 <context>directory</context>
461 <context>.htaccess</context>
463 <override></override>
464 <compatibility>AddOutputFilter
465 is only available in Apache 2.0.26 and later.</compatibility>
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>
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>
485 AddOutputFilter INCLUDES;DEFLATE shtml
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>
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>
504 <context>server config</context>
505 <context>virtual host</context>
506 <context>directory</context>
507 <context>.htaccess</context>
509 <override>FileInfo</override>
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>
525 AddType image/gif .gif
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>
532 <p>The <em>extension</em> argument is case-insensitive, and can
533 be specified with or without a leading dot.</p>
536 <seealso><directive module="core">DefaultType</directive></seealso>
537 <seealso><directive module="core">ForceType</directive></seealso>
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>
547 <context>server config</context>
548 <context>virtual host</context>
549 <context>directory</context>
550 <context>.htaccess</context>
552 <override>FileInfo</override>
553 <compatibility>Available
554 in Apache 2.0.26 and later.</compatibility>
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>
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>
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>
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>
583 <p>For example, the following configuration will allow handlers
584 and filters to participate in Multviews, but will exclude unknown
587 MultiviewsMatch Handlers Filters
591 <seealso><directive module="core">Options</directive></seealso>
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>
601 <context>server config</context>
602 <context>virtual host</context>
603 <context>directory</context>
604 <context>.htaccess</context>
606 <override>FileInfo</override>
607 <compatibility>DefaultLanguage
608 is only available in Apache 1.3.4 and later.</compatibility>
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><Directory></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
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>
629 <example><title>Example</title>
634 <seealso><module>mod_negotiation</module></seealso>
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>
645 <context>directory</context>
646 <context>.htaccess</context>
648 <compatibility>RemoveCharset is
649 only available in Apache 2.0.24 and later.</compatibility>
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>
658 <p>The <em>extension</em> argument is case-insensitive, and can
659 be specified with or without a leading dot.</p>
661 <example><title>Example</title>
662 RemoveCharset .html .shtml
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>
675 <context>directory</context>
676 <context>.htaccess</context>
678 <compatibility>RemoveEncoding
679 is only available in Apache 1.3.13 and later.</compatibility>
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>
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><Files *.gz.asc></code><br />
696 <code> RemoveEncoding
698 <code></Files></code></dd>
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>
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>
711 <p>The <em>extension</em> argument is case-insensitive, and can
712 be specified with or without a leading dot.</p>
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>
724 <context>directory</context>
725 <context>.htaccess</context>
727 <compatibility>RemoveHandler is
728 only available in Apache 1.3.4 and later.</compatibility>
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>
740 <dt><code>/foo/.htaccess:</code></dt>
742 <dd><code>AddHandler server-parsed .html</code></dd>
744 <dt><code>/foo/bar/.htaccess:</code></dt>
746 <dd><code>RemoveHandler .html</code></dd>
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>
756 <p>The <em>extension</em> argument is case-insensitive, and can
757 be specified with or without a leading dot.</p>
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>
769 <context>directory</context>
770 <context>.htaccess</context>
772 <compatibility>RemoveInputFilter is only available in Apache
773 2.0.26 and later.</compatibility>
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>
783 <p>The <em>extension</em> argument is case-insensitive, and can
784 be specified with or without a leading dot.</p>
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>
796 <context>directory</context>
797 <context>.htaccess</context>
799 <compatibility>RemoveLanguage
800 is only available in Apache 2.0.24 and later.</compatibility>
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>
811 <p>The <em>extension</em> argument is case-insensitive, and can
812 be specified with or without a leading dot.</p>
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>
823 <context>directory</context>
824 <context>.htaccess</context>
826 <override></override>
827 <compatibility>RemoveOutputFilter is only available in Apache
828 2.0.26 and later.</compatibility>
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>
838 <p>The <em>extension</em> argument is case-insensitive, and can
839 be specified with or without a leading dot.</p>
845 <name>RemoveType</name>
846 <description>Removes any content type associations for a set of file
847 extensions</description>
849 <em>extension</em> [<em>extension</em>] ...</syntax>
851 <context>directory</context>
852 <context>.htaccess</context>
854 <override></override>
855 <compatibility>RemoveType is
856 only available in Apache 1.3.13 and later.</compatibility>
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>
867 <dt><code>/foo/.htaccess:</code></dt>
869 <dd><code>RemoveType .cgi</code></dd>
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>
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>
884 <p>The <em>extension</em> argument is case-insensitive, and can
885 be specified with or without a leading dot.</p>
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>
895 <context>server config</context>
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
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>
915 <p>The file contains lines in the format of the arguments to
916 an <directive module="mod_mime">AddType</directive> directive:</p>
919 MIME-type extension extension ...
923 The case of the extension does not matter. Blank lines, and lines
924 beginning with a hash character (`#') are ignored. </p>
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>
936 <seealso><module>mod_mime_magic</module></seealso>