c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<?xml version="1.0"?>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<!DOCTYPE modulesynopsis SYSTEM "/style/modulesynopsis.dtd">
e942c741056732f50da2074b36fe59805d370650slive<?xml-stylesheet type="text/xsl" href="/style/manual.en.xsl"?>
5f5d1b4cc970b7f06ff8ef6526128e9a27303d88nd<!-- $LastChangedRevision$ -->
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd<!--
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding Licensed to the Apache Software Foundation (ASF) under one or more
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding contributor license agreements. See the NOTICE file distributed with
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding this work for additional information regarding copyright ownership.
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding The ASF licenses this file to You under the Apache License, Version 2.0
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding (the "License"); you may not use this file except in compliance with
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding the License. You may obtain a copy of the License at
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd http://www.apache.org/licenses/LICENSE-2.0
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd Unless required by applicable law or agreed to in writing, software
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd distributed under the License is distributed on an "AS IS" BASIS,
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd See the License for the specific language governing permissions and
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd limitations under the License.
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd-->
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd
7db9f691a00ead175b03335457ca296a33ddf31bnd<modulesynopsis metafile="mod_mime.xml.meta">
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<name>mod_mime</name>
75569f53579b42dc17cf097015b6b055c01e6875slive<description>Associates the requested filename's extensions
75569f53579b42dc17cf097015b6b055c01e6875slive with the file's behavior (handlers and filters)
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen and content (mime-type, language, character set and
c3fcea07965f59723831e23da647a77518285b8eslive encoding)</description>
c3fcea07965f59723831e23da647a77518285b8eslive<status>Base</status>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<sourcefile>mod_mime.c</sourcefile>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<identifier>mime_module</identifier>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<summary>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <p>This module is used to assign content metadata to the content
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding selected for an HTTP response by mapping patterns in the
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding URI or filenames to the metadata values. For example, the filename
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding extensions of content files often define the content's Internet
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding media type, language, character set, and content-encoding. This
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding information is sent in HTTP messages containing that content and
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding used in content negotiation when selecting alternatives, such that
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding the user's preferences are respected when choosing one of several
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding possible contents to serve. See
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen <module>mod_negotiation</module> for more information
75159a79720160d33d888cf45481ef400c1e3a01nd about <a href="/content-negotiation.html">content negotiation</a>.</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
75569f53579b42dc17cf097015b6b055c01e6875slive <p>The directives <directive
75569f53579b42dc17cf097015b6b055c01e6875slive module="mod_mime">AddCharset</directive>, <directive
75569f53579b42dc17cf097015b6b055c01e6875slive module="mod_mime">AddEncoding</directive>, <directive
75569f53579b42dc17cf097015b6b055c01e6875slive module="mod_mime">AddLanguage</directive> and <directive
75569f53579b42dc17cf097015b6b055c01e6875slive module="mod_mime">AddType</directive> are all used to map file
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding extensions onto the metadata for that file. Respectively
75569f53579b42dc17cf097015b6b055c01e6875slive they set the character set, content-encoding, content-language,
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding and <glossary>media-type</glossary> (content-type) of documents. The directive <directive
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive module="mod_mime">TypesConfig</directive> is used to specify a
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding file which also maps extensions onto media types. </p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive <p>In addition, <module>mod_mime</module> may define the <a
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive href="/handler.html">handler</a> and <a
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive href="/filter.html">filters</a> that originate and process
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive content. The directives <directive
75569f53579b42dc17cf097015b6b055c01e6875slive module="mod_mime">AddHandler</directive>, <directive
75569f53579b42dc17cf097015b6b055c01e6875slive module="mod_mime">AddOutputFilter</directive>, and <directive
75569f53579b42dc17cf097015b6b055c01e6875slive module="mod_mime">AddInputFilter</directive> control the modules
75569f53579b42dc17cf097015b6b055c01e6875slive or scripts that serve the document. The <directive
75569f53579b42dc17cf097015b6b055c01e6875slive module="mod_mime">MultiviewsMatch</directive> directive allows
75569f53579b42dc17cf097015b6b055c01e6875slive <module>mod_negotiation</module> to consider these file extensions
f794e11d17dcdae9f5f2944a5bfd06a7ded6a579yoshiki to be included when testing Multiviews matches.</p>
75569f53579b42dc17cf097015b6b055c01e6875slive
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <p>While <module>mod_mime</module> associates metadata
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive with filename extensions, the <module>core</module> server
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive provides directives that are used to associate all the files in a
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive given container (<em>e.g.</em>, <directive type="section"
df5db89264efca559e954ca181763a0d3ef2f844nd module="core">Location</directive>, <directive type="section"
df5db89264efca559e954ca181763a0d3ef2f844nd module="core">Directory</directive>, or <directive type="section"
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive module="core">Files</directive>) with particular
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding metadata. These directives include <directive
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive module="core">ForceType</directive>, <directive
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive module="core">SetHandler</directive>, <directive
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive module="core">SetInputFilter</directive>, and <directive
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive module="core">SetOutputFilter</directive>. The core directives
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive override any filename extension mappings defined in
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive <module>mod_mime</module>.</p>
75569f53579b42dc17cf097015b6b055c01e6875slive
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <p>Note that changing the metadata for a file does not
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen change the value of the <code>Last-Modified</code> header.
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen Thus, previously cached copies may still be used by a client or
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen proxy, with the previous headers. If you change the
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding metadata (language, content type, character set or
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen encoding) you may need to 'touch' affected files (updating
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen their last modified date) to ensure that all visitors are
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen receive the corrected content headers.</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</summary>
75159a79720160d33d888cf45481ef400c1e3a01nd<seealso><directive
75159a79720160d33d888cf45481ef400c1e3a01ndmodule="mod_mime_magic">MimeMagicFile</directive></seealso>
75569f53579b42dc17cf097015b6b055c01e6875slive<seealso><directive module="core">AddDefaultCharset</directive></seealso>
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive<seealso><directive module="core">ForceType</directive></seealso>
75569f53579b42dc17cf097015b6b055c01e6875slive<seealso><directive module="core">SetHandler</directive></seealso>
75569f53579b42dc17cf097015b6b055c01e6875slive<seealso><directive module="core">SetInputFilter</directive></seealso>
75569f53579b42dc17cf097015b6b055c01e6875slive<seealso><directive module="core">SetOutputFilter</directive></seealso>
75569f53579b42dc17cf097015b6b055c01e6875slive
75159a79720160d33d888cf45481ef400c1e3a01nd<section id="multipleext"><title>Files with Multiple Extensions</title>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <p>Files can have more than one extension; the order of the
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen extensions is <em>normally</em> irrelevant. For example, if the
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen file <code>welcome.html.fr</code> maps onto content type
75159a79720160d33d888cf45481ef400c1e3a01nd <code>text/html</code> and language French then the file
c14037646789087319802aaada2e8534ccab0158slive <code>welcome.fr.html</code> will map onto exactly the same
d7829068d487c77c1052fef7ad7f21d60cead2d5slive information. If more than one extension is given that maps onto
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding the same type of metadata, then the one to the right will
c14037646789087319802aaada2e8534ccab0158slive be used, except for languages and content encodings. For example,
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding if <code>.gif</code> maps to the <glossary>media-type</glossary>
c14037646789087319802aaada2e8534ccab0158slive <code>image/gif</code> and <code>.html</code> maps to the
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding media-type <code>text/html</code>, then the file
c14037646789087319802aaada2e8534ccab0158slive <code>welcome.gif.html</code> will be associated with the
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding media-type <code>text/html</code>.</p>
73cee0397242a5dd872d618c65e416327b774f18nd
73cee0397242a5dd872d618c65e416327b774f18nd <p><a href="#charset-lang">Languages</a> and <a href="#contentencoding"
73cee0397242a5dd872d618c65e416327b774f18nd >content encodings</a> are treated accumulative, because one can assign
90361ddfb3a8abaa0f8fb1729732062c78d8dc50niq more than one language or encoding to a particular resource. For example,
73cee0397242a5dd872d618c65e416327b774f18nd the file <code>welcome.html.en.de</code> will be delivered with
73cee0397242a5dd872d618c65e416327b774f18nd <code>Content-Language: en, de</code> and <code>Content-Type:
73cee0397242a5dd872d618c65e416327b774f18nd text/html</code>.</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen <p>Care should be taken when a file with multiple extensions
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding gets associated with both a <glossary>media-type</glossary>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding and a handler. This will
d7829068d487c77c1052fef7ad7f21d60cead2d5slive usually result in the request being handled by the module associated
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen with the handler. For example, if the <code>.imap</code>
75159a79720160d33d888cf45481ef400c1e3a01nd extension is mapped to the handler <code>imap-file</code> (from
7d15331eeb5429d7148d13d6fd914a641bf1c000pquerna <module>mod_imagemap</module>) and the <code>.html</code> extension is
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding mapped to the media-type <code>text/html</code>, then the file
75159a79720160d33d888cf45481ef400c1e3a01nd <code>world.imap.html</code> will be associated with both the
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <code>imap-file</code> handler and <code>text/html</code> media-type.
75159a79720160d33d888cf45481ef400c1e3a01nd When it is processed, the <code>imap-file</code> handler will be used,
7d15331eeb5429d7148d13d6fd914a641bf1c000pquerna and so it will be treated as a <module>mod_imagemap</module> imagemap
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen file.</p>
d7829068d487c77c1052fef7ad7f21d60cead2d5slive
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <p>If you would prefer only the last dot-separated part of the
d7829068d487c77c1052fef7ad7f21d60cead2d5slive filename to be mapped to a particular piece of meta-data, then do
d7829068d487c77c1052fef7ad7f21d60cead2d5slive not use the <code>Add*</code> directives. For example, if you wish
d7829068d487c77c1052fef7ad7f21d60cead2d5slive to have the file <code>foo.html.cgi</code> processed as a CGI
d7829068d487c77c1052fef7ad7f21d60cead2d5slive script, but not the file <code>bar.cgi.html</code>, then instead
d7829068d487c77c1052fef7ad7f21d60cead2d5slive of using <code>AddHandler cgi-script .cgi</code>, use</p>
d7829068d487c77c1052fef7ad7f21d60cead2d5slive
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <example><title>Configure handler based on final extension only</title>
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh <highlight language="config">
5246df66c92337c9b8f8379f1b50f3fa08759663rbowen&lt;FilesMatch "[^.]+\.cgi$"&gt;
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh SetHandler cgi-script
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh&lt;/FilesMatch&gt;
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh </highlight>
d7829068d487c77c1052fef7ad7f21d60cead2d5slive </example>
d7829068d487c77c1052fef7ad7f21d60cead2d5slive
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</section>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c3fcea07965f59723831e23da647a77518285b8eslive<section id="contentencoding"><title>Content encoding</title>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <p>A file of a particular <glossary>media-type</glossary> can additionally be encoded a
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen particular way to simplify transmission over the Internet.
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen While this usually will refer to compression, such as
c3fcea07965f59723831e23da647a77518285b8eslive <code>gzip</code>, it can also refer to encryption, such a
c3fcea07965f59723831e23da647a77518285b8eslive <code>pgp</code> or to an encoding such as UUencoding, which is
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen designed for transmitting a binary file in an ASCII (text)
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen format.</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
1ebdc607ba27ebd12f65da5c0b24c19038fcab1cnd <p>The <a href="http://www.ietf.org/rfc/rfc2616.txt">HTTP/1.1
1ebdc607ba27ebd12f65da5c0b24c19038fcab1cnd RFC</a>, section 14.11 puts it this way:</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
1ebdc607ba27ebd12f65da5c0b24c19038fcab1cnd <blockquote cite="http://www.ietf.org/rfc/rfc2616.txt">
1ebdc607ba27ebd12f65da5c0b24c19038fcab1cnd <p>The Content-Encoding entity-header field is used as a modifier to
1ebdc607ba27ebd12f65da5c0b24c19038fcab1cnd the media-type. When present, its value indicates what additional
1ebdc607ba27ebd12f65da5c0b24c19038fcab1cnd content codings have been applied to the entity-body, and thus what
1ebdc607ba27ebd12f65da5c0b24c19038fcab1cnd decoding mechanisms must be applied in order to obtain the media-type
1ebdc607ba27ebd12f65da5c0b24c19038fcab1cnd referenced by the Content-Type header field. Content-Encoding is
1ebdc607ba27ebd12f65da5c0b24c19038fcab1cnd primarily used to allow a document to be compressed without losing
1ebdc607ba27ebd12f65da5c0b24c19038fcab1cnd the identity of its underlying media type.</p>
75159a79720160d33d888cf45481ef400c1e3a01nd </blockquote>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen <p>By using more than one file extension (see <a
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen href="#multipleext">section above about multiple file
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen extensions</a>), you can indicate that a file is of a
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen particular <em>type</em>, and also has a particular
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen <em>encoding</em>. </p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen <p>For example, you may have a file which is a Microsoft Word
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen document, which is pkzipped to reduce its size. If the
c3fcea07965f59723831e23da647a77518285b8eslive <code>.doc</code> extension is associated with the Microsoft
c3fcea07965f59723831e23da647a77518285b8eslive Word file type, and the <code>.zip</code> extension is
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen associated with the pkzip file encoding, then the file
73cee0397242a5dd872d618c65e416327b774f18nd <code>Resume.doc.zip</code> would be known to be a pkzip'ed Word
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen document.</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
75159a79720160d33d888cf45481ef400c1e3a01nd <p>Apache sends a <code>Content-encoding</code> header with the
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen resource, in order to tell the client browser about the
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen encoding method.</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
7a98571671f92e53441bf24a0222768072172f90coar <highlight language="config">
7a98571671f92e53441bf24a0222768072172f90coarContent-encoding: pkzip
7a98571671f92e53441bf24a0222768072172f90coar </highlight>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</section>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
75159a79720160d33d888cf45481ef400c1e3a01nd<section id="charset-lang"><title>Character sets and languages</title>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen <p>In addition to file type and the file encoding,
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen another important piece of information is what language a
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen particular document is in, and in what character set the file
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen should be displayed. For example, the document might be written
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen in the Vietnamese alphabet, or in Cyrillic, and should be
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen displayed as such. This information, also, is transmitted in
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen HTTP headers.</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
860b4efe27e7c1c9a2bf5c872b29c90f76849b51jim <p>The character set, language, encoding and mime type are all
860b4efe27e7c1c9a2bf5c872b29c90f76849b51jim used in the process of content negotiation (See
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen <module>mod_negotiation</module>) to determine
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen which document to give to the client, when there are
860b4efe27e7c1c9a2bf5c872b29c90f76849b51jim alternative documents in more than one character set, language,
75159a79720160d33d888cf45481ef400c1e3a01nd encoding or mime type. All filename extensions associations
199a8ee5984e3708982fab1ba6ebb0a5feaea90cnd created with <directive module="mod_mime">AddCharset</directive>,
199a8ee5984e3708982fab1ba6ebb0a5feaea90cnd <directive module="mod_mime">AddEncoding</directive>, <directive
199a8ee5984e3708982fab1ba6ebb0a5feaea90cnd module="mod_mime">AddLanguage</directive> and <directive
199a8ee5984e3708982fab1ba6ebb0a5feaea90cnd module="mod_mime">AddType</directive> directives
199a8ee5984e3708982fab1ba6ebb0a5feaea90cnd (and extensions listed in the <directive module="mod_mime_magic"
199a8ee5984e3708982fab1ba6ebb0a5feaea90cnd >MimeMagicFile</directive>) participate in this select process.
199a8ee5984e3708982fab1ba6ebb0a5feaea90cnd Filename extensions that are only associated using the <directive
199a8ee5984e3708982fab1ba6ebb0a5feaea90cnd module="mod_mime">AddHandler</directive>, <directive module="mod_mime"
199a8ee5984e3708982fab1ba6ebb0a5feaea90cnd >AddInputFilter</directive> or <directive module="mod_mime"
199a8ee5984e3708982fab1ba6ebb0a5feaea90cnd >AddOutputFilter</directive> directives may be included or excluded
199a8ee5984e3708982fab1ba6ebb0a5feaea90cnd from matching by using the <directive module="mod_mime"
199a8ee5984e3708982fab1ba6ebb0a5feaea90cnd >MultiviewsMatch</directive> directive.</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
75159a79720160d33d888cf45481ef400c1e3a01nd <section id="charset"><title>Charset</title>
75159a79720160d33d888cf45481ef400c1e3a01nd <p>To convey this further information, Apache optionally sends
75159a79720160d33d888cf45481ef400c1e3a01nd a <code>Content-Language</code> header, to specify the language
75159a79720160d33d888cf45481ef400c1e3a01nd that the document is in, and can append additional information
75159a79720160d33d888cf45481ef400c1e3a01nd onto the <code>Content-Type</code> header to indicate the
75159a79720160d33d888cf45481ef400c1e3a01nd particular character set that should be used to correctly
75159a79720160d33d888cf45481ef400c1e3a01nd render the information.</p>
75159a79720160d33d888cf45481ef400c1e3a01nd
75159a79720160d33d888cf45481ef400c1e3a01nd <example>
1449dcd10994475163af1b4ceab2a8413743e01bhumbedoohContent-Language: en, fr
1449dcd10994475163af1b4ceab2a8413743e01bhumbedoohContent-Type: text/plain; charset=ISO-8859-1
75159a79720160d33d888cf45481ef400c1e3a01nd </example>
75159a79720160d33d888cf45481ef400c1e3a01nd
75159a79720160d33d888cf45481ef400c1e3a01nd <p>The language specification is the two-letter abbreviation
75159a79720160d33d888cf45481ef400c1e3a01nd for the language. The <code>charset</code> is the name of the
75159a79720160d33d888cf45481ef400c1e3a01nd particular character set which should be used.</p>
75159a79720160d33d888cf45481ef400c1e3a01nd </section>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</section>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<name>AddCharset</name>
75159a79720160d33d888cf45481ef400c1e3a01nd<description>Maps the given filename extensions to the specified content
75159a79720160d33d888cf45481ef400c1e3a01ndcharset</description>
75159a79720160d33d888cf45481ef400c1e3a01nd<syntax>AddCharset <var>charset</var> <var>extension</var>
75159a79720160d33d888cf45481ef400c1e3a01nd[<var>extension</var>] ...</syntax>
75159a79720160d33d888cf45481ef400c1e3a01nd<contextlist><context>server config</context><context>virtual host</context>
75159a79720160d33d888cf45481ef400c1e3a01nd<context>directory</context><context>.htaccess</context></contextlist>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<override>FileInfo</override>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<usage>
75159a79720160d33d888cf45481ef400c1e3a01nd <p>The <directive>AddCharset</directive> directive maps the given
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding filename extensions to the specified content charset (the Internet
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding registered name for a given character encoding). <var>charset</var>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding is the <a href="http://www.iana.org/assignments/character-sets">media
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding type's charset parameter</a> for resources with filenames containing
75159a79720160d33d888cf45481ef400c1e3a01nd <var>extension</var>. This mapping is added to any already in force,
75159a79720160d33d888cf45481ef400c1e3a01nd overriding any mappings that already exist for the same
75159a79720160d33d888cf45481ef400c1e3a01nd <var>extension</var>.</p>
75159a79720160d33d888cf45481ef400c1e3a01nd
75159a79720160d33d888cf45481ef400c1e3a01nd <example><title>Example</title>
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh <highlight language="config">
1449dcd10994475163af1b4ceab2a8413743e01bhumbedoohAddLanguage ja .ja
1449dcd10994475163af1b4ceab2a8413743e01bhumbedoohAddCharset EUC-JP .euc
1449dcd10994475163af1b4ceab2a8413743e01bhumbedoohAddCharset ISO-2022-JP .jis
1449dcd10994475163af1b4ceab2a8413743e01bhumbedoohAddCharset SHIFT_JIS .sjis
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh </highlight>
75159a79720160d33d888cf45481ef400c1e3a01nd </example>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen <p>Then the document <code>xxxx.ja.jis</code> will be treated
75159a79720160d33d888cf45481ef400c1e3a01nd as being a Japanese document whose charset is <code>ISO-2022-JP</code>
75159a79720160d33d888cf45481ef400c1e3a01nd (as will the document <code>xxxx.jis.ja</code>). The
75159a79720160d33d888cf45481ef400c1e3a01nd <directive>AddCharset</directive> directive is useful for both to
75159a79720160d33d888cf45481ef400c1e3a01nd inform the client about the character encoding of the document so that
75159a79720160d33d888cf45481ef400c1e3a01nd the document can be interpreted and displayed appropriately, and for <a
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen href="/content-negotiation.html">content negotiation</a>,
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen where the server returns one from several documents based on
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen the client's charset preference.</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <p>The <var>extension</var> argument is case-insensitive and can
d7829068d487c77c1052fef7ad7f21d60cead2d5slive be specified with or without a leading dot. Filenames may have <a
d7829068d487c77c1052fef7ad7f21d60cead2d5slive href="#multipleext">multiple extensions</a> and the
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <var>extension</var> argument will be compared against each of
d7829068d487c77c1052fef7ad7f21d60cead2d5slive them.</p>
d7829068d487c77c1052fef7ad7f21d60cead2d5slive
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</usage>
c3fcea07965f59723831e23da647a77518285b8eslive<seealso><module>mod_negotiation</module></seealso>
75569f53579b42dc17cf097015b6b055c01e6875slive<seealso><directive module="core">AddDefaultCharset</directive></seealso>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<name>AddEncoding</name>
75159a79720160d33d888cf45481ef400c1e3a01nd<description>Maps the given filename extensions to the specified encoding
75159a79720160d33d888cf45481ef400c1e3a01ndtype</description>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<syntax>AddEncoding <var>encoding</var> <var>extension</var>
75159a79720160d33d888cf45481ef400c1e3a01nd[<var>extension</var>] ...</syntax>
75159a79720160d33d888cf45481ef400c1e3a01nd<contextlist><context>server config</context><context>virtual host</context>
75159a79720160d33d888cf45481ef400c1e3a01nd<context>directory</context><context>.htaccess</context></contextlist>
c3fcea07965f59723831e23da647a77518285b8eslive<override>FileInfo</override>
c3fcea07965f59723831e23da647a77518285b8eslive
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<usage>
75159a79720160d33d888cf45481ef400c1e3a01nd <p>The <directive>AddEncoding</directive> directive maps the given
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding filename extensions to the specified HTTP content-encoding.
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <var>encoding</var> is the HTTP content coding to append to the
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding value of the Content-Encoding header field for documents named with the
75159a79720160d33d888cf45481ef400c1e3a01nd <var>extension</var>. This mapping is added to any already in force,
75159a79720160d33d888cf45481ef400c1e3a01nd overriding any mappings that already exist for the same
75159a79720160d33d888cf45481ef400c1e3a01nd <var>extension</var>.</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
75159a79720160d33d888cf45481ef400c1e3a01nd <example><title>Example</title>
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh <highlight language="config">
1449dcd10994475163af1b4ceab2a8413743e01bhumbedoohAddEncoding x-gzip .gz
1449dcd10994475163af1b4ceab2a8413743e01bhumbedoohAddEncoding x-compress .Z
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh </highlight>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen </example>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
75159a79720160d33d888cf45481ef400c1e3a01nd <p>This will cause filenames containing the <code>.gz</code> extension
75159a79720160d33d888cf45481ef400c1e3a01nd to be marked as encoded using the <code>x-gzip</code> encoding, and
75159a79720160d33d888cf45481ef400c1e3a01nd filenames containing the <code>.Z</code> extension to be marked as
75159a79720160d33d888cf45481ef400c1e3a01nd encoded with <code>x-compress</code>.</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
75159a79720160d33d888cf45481ef400c1e3a01nd <p>Old clients expect <code>x-gzip</code> and <code>x-compress</code>,
75159a79720160d33d888cf45481ef400c1e3a01nd however the standard dictates that they're equivalent to
75159a79720160d33d888cf45481ef400c1e3a01nd <code>gzip</code> and <code>compress</code> respectively. Apache does
75159a79720160d33d888cf45481ef400c1e3a01nd content encoding comparisons by ignoring any leading <code>x-</code>.
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen When responding with an encoding Apache will use whatever form
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen (<em>i.e.</em>, <code>x-foo</code> or <code>foo</code>) the
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen client requested. If the client didn't specifically request a
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen particular form Apache will use the form given by the
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen <code>AddEncoding</code> directive. To make this long story
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen short, you should always use <code>x-gzip</code> and
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen <code>x-compress</code> for these two specific encodings. More
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding recent encodings, such as <code>deflate</code>, should be
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen specified without the <code>x-</code>.</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <p>The <var>extension</var> argument is case-insensitive and can
d7829068d487c77c1052fef7ad7f21d60cead2d5slive be specified with or without a leading dot. Filenames may have <a
d7829068d487c77c1052fef7ad7f21d60cead2d5slive href="#multipleext">multiple extensions</a> and the
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <var>extension</var> argument will be compared against each of
d7829068d487c77c1052fef7ad7f21d60cead2d5slive them.</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</usage>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<name>AddHandler</name>
75159a79720160d33d888cf45481ef400c1e3a01nd<description>Maps the filename extensions to the specified
75159a79720160d33d888cf45481ef400c1e3a01ndhandler</description>
75159a79720160d33d888cf45481ef400c1e3a01nd<syntax>AddHandler <var>handler-name</var> <var>extension</var>
75159a79720160d33d888cf45481ef400c1e3a01nd[<var>extension</var>] ...</syntax>
75159a79720160d33d888cf45481ef400c1e3a01nd<contextlist><context>server config</context><context>virtual host</context>
75159a79720160d33d888cf45481ef400c1e3a01nd<context>directory</context><context>.htaccess</context></contextlist>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<override>FileInfo</override>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<usage>
75159a79720160d33d888cf45481ef400c1e3a01nd <p>Files having the name <var>extension</var> will be served by the
75159a79720160d33d888cf45481ef400c1e3a01nd specified <var><a href="/handler.html">handler-name</a></var>. This
75159a79720160d33d888cf45481ef400c1e3a01nd mapping is added to any already in force, overriding any mappings that
75159a79720160d33d888cf45481ef400c1e3a01nd already exist for the same <var>extension</var>. For example, to
75159a79720160d33d888cf45481ef400c1e3a01nd activate CGI scripts with the file extension <code>.cgi</code>, you
75159a79720160d33d888cf45481ef400c1e3a01nd might use:</p>
75159a79720160d33d888cf45481ef400c1e3a01nd
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh <highlight language="config">
7a98571671f92e53441bf24a0222768072172f90coarAddHandler cgi-script .cgi
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh </highlight>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
75159a79720160d33d888cf45481ef400c1e3a01nd <p>Once that has been put into your httpd.conf file, any file containing
75159a79720160d33d888cf45481ef400c1e3a01nd the <code>.cgi</code> extension will be treated as a CGI program.</p>
75159a79720160d33d888cf45481ef400c1e3a01nd
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <p>The <var>extension</var> argument is case-insensitive and can
d7829068d487c77c1052fef7ad7f21d60cead2d5slive be specified with or without a leading dot. Filenames may have <a
d7829068d487c77c1052fef7ad7f21d60cead2d5slive href="#multipleext">multiple extensions</a> and the
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <var>extension</var> argument will be compared against each of
d7829068d487c77c1052fef7ad7f21d60cead2d5slive them.</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</usage>
75569f53579b42dc17cf097015b6b055c01e6875slive<seealso><directive module="core">SetHandler</directive></seealso>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<name>AddInputFilter</name>
75159a79720160d33d888cf45481ef400c1e3a01nd<description>Maps filename extensions to the filters that will process
75159a79720160d33d888cf45481ef400c1e3a01ndclient requests</description>
75159a79720160d33d888cf45481ef400c1e3a01nd<syntax>AddInputFilter <var>filter</var>[;<var>filter</var>...]
75159a79720160d33d888cf45481ef400c1e3a01nd<var>extension</var> [<var>extension</var>] ...</syntax>
75159a79720160d33d888cf45481ef400c1e3a01nd<contextlist><context>server config</context><context>virtual host</context>
75159a79720160d33d888cf45481ef400c1e3a01nd<context>directory</context><context>.htaccess</context></contextlist>
75159a79720160d33d888cf45481ef400c1e3a01nd<override>FileInfo</override>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<usage>
75159a79720160d33d888cf45481ef400c1e3a01nd <p><directive>AddInputFilter</directive> maps the filename extension
75159a79720160d33d888cf45481ef400c1e3a01nd <var>extension</var> to the <a href="/filter.html">filters</a> which
75159a79720160d33d888cf45481ef400c1e3a01nd will process client requests and POST input when they are received by
75159a79720160d33d888cf45481ef400c1e3a01nd the server. This is in addition to any filters defined elsewhere,
75159a79720160d33d888cf45481ef400c1e3a01nd including the <directive module="core">SetInputFilter</directive>
75159a79720160d33d888cf45481ef400c1e3a01nd directive. This mapping is merged over any already in force, overriding
75159a79720160d33d888cf45481ef400c1e3a01nd any mappings that already exist for the same <var>extension</var>.</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <p>If more than one <var>filter</var> is specified, they must be separated
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen by semicolons in the order in which they should process the
d7829068d487c77c1052fef7ad7f21d60cead2d5slive content. The <var>filter</var> is case-insensitive.</p>
d7829068d487c77c1052fef7ad7f21d60cead2d5slive
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <p>The <var>extension</var> argument is case-insensitive and can
d7829068d487c77c1052fef7ad7f21d60cead2d5slive be specified with or without a leading dot. Filenames may have <a
d7829068d487c77c1052fef7ad7f21d60cead2d5slive href="#multipleext">multiple extensions</a> and the
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <var>extension</var> argument will be compared against each of
d7829068d487c77c1052fef7ad7f21d60cead2d5slive them.</p>
d7829068d487c77c1052fef7ad7f21d60cead2d5slive
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</usage>
62e106881e35e8086a5c936db3c81e34adb872aejerenkrantz<seealso><directive module="mod_mime">RemoveInputFilter</directive></seealso>
62e106881e35e8086a5c936db3c81e34adb872aejerenkrantz<seealso><directive module="core">SetInputFilter</directive></seealso>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<name>AddLanguage</name>
75159a79720160d33d888cf45481ef400c1e3a01nd<description>Maps the given filename extension to the specified content
75159a79720160d33d888cf45481ef400c1e3a01ndlanguage</description>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<syntax>AddLanguage <var>language-tag</var> <var>extension</var>
75159a79720160d33d888cf45481ef400c1e3a01nd[<var>extension</var>] ...</syntax>
75159a79720160d33d888cf45481ef400c1e3a01nd<contextlist><context>server config</context><context>virtual host</context>
75159a79720160d33d888cf45481ef400c1e3a01nd<context>directory</context><context>.htaccess</context></contextlist>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<override>FileInfo</override>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<usage>
75159a79720160d33d888cf45481ef400c1e3a01nd <p>The <directive>AddLanguage</directive> directive maps the given
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding filename extension to the specified content language. Files with the
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding filename <var>extension</var> are assigned an HTTP Content-Language
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding value of <var>language-tag</var> corresponding to the language
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding identifiers defined by RFC 3066.
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding This directive overrides any mappings that already exist for the same
75159a79720160d33d888cf45481ef400c1e3a01nd <var>extension</var>.</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
75159a79720160d33d888cf45481ef400c1e3a01nd <example><title>Example</title>
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh <highlight language="config">
1449dcd10994475163af1b4ceab2a8413743e01bhumbedoohAddEncoding x-compress .Z
1449dcd10994475163af1b4ceab2a8413743e01bhumbedoohAddLanguage en .en
1449dcd10994475163af1b4ceab2a8413743e01bhumbedoohAddLanguage fr .fr
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh </highlight>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen </example>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen <p>Then the document <code>xxxx.en.Z</code> will be treated as
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen being a compressed English document (as will the document
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen <code>xxxx.Z.en</code>). Although the content language is
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen reported to the client, the browser is unlikely to use this
75159a79720160d33d888cf45481ef400c1e3a01nd information. The <directive>AddLanguage</directive> directive is
75159a79720160d33d888cf45481ef400c1e3a01nd more useful for <a href="/content-negotiation.html">content
75159a79720160d33d888cf45481ef400c1e3a01nd negotiation</a>, where the server returns one from several documents
75159a79720160d33d888cf45481ef400c1e3a01nd based on the client's language preference.</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen <p>If multiple language assignments are made for the same
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen extension, the last one encountered is the one that is used.
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen That is, for the case of:</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh <highlight language="config">
1449dcd10994475163af1b4ceab2a8413743e01bhumbedoohAddLanguage en .en
1449dcd10994475163af1b4ceab2a8413743e01bhumbedoohAddLanguage en-gb .en
1449dcd10994475163af1b4ceab2a8413743e01bhumbedoohAddLanguage en-us .en
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh </highlight>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
75159a79720160d33d888cf45481ef400c1e3a01nd <p>documents with the extension <code>.en</code> would be treated as
75159a79720160d33d888cf45481ef400c1e3a01nd being <code>en-us</code>.</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <p>The <var>extension</var> argument is case-insensitive and can
d7829068d487c77c1052fef7ad7f21d60cead2d5slive be specified with or without a leading dot. Filenames may have <a
d7829068d487c77c1052fef7ad7f21d60cead2d5slive href="#multipleext">multiple extensions</a> and the
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <var>extension</var> argument will be compared against each of
d7829068d487c77c1052fef7ad7f21d60cead2d5slive them.</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</usage>
c3fcea07965f59723831e23da647a77518285b8eslive<seealso><module>mod_negotiation</module></seealso>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<name>AddOutputFilter</name>
75159a79720160d33d888cf45481ef400c1e3a01nd<description>Maps filename extensions to the filters that will process
c3fcea07965f59723831e23da647a77518285b8esliveresponses from the server</description>
75159a79720160d33d888cf45481ef400c1e3a01nd<syntax>AddOutputFilter <var>filter</var>[;<var>filter</var>...]
75159a79720160d33d888cf45481ef400c1e3a01nd<var>extension</var> [<var>extension</var>] ...</syntax>
75159a79720160d33d888cf45481ef400c1e3a01nd<contextlist><context>server config</context><context>virtual host</context>
75159a79720160d33d888cf45481ef400c1e3a01nd<context>directory</context><context>.htaccess</context></contextlist>
75159a79720160d33d888cf45481ef400c1e3a01nd<override>FileInfo</override>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<usage>
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive <p>The <directive>AddOutputFilter</directive> directive maps the
75159a79720160d33d888cf45481ef400c1e3a01nd filename extension <var>extension</var> to the <a
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive href="/filter.html">filters</a> which will process responses
75159a79720160d33d888cf45481ef400c1e3a01nd from the server before they are sent to the client. This is in
75159a79720160d33d888cf45481ef400c1e3a01nd addition to any filters defined elsewhere, including <directive
663cbde3169bcfadb51937e7c3af75307c5af91cniq module="core">SetOutputFilter</directive> and <directive module="mod_filter"
75159a79720160d33d888cf45481ef400c1e3a01nd >AddOutputFilterByType</directive> directive. This mapping is merged
75159a79720160d33d888cf45481ef400c1e3a01nd over any already in force, overriding any mappings that already exist
75159a79720160d33d888cf45481ef400c1e3a01nd for the same <var>extension</var>.</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen <p>For example, the following configuration will process all
75159a79720160d33d888cf45481ef400c1e3a01nd <code>.shtml</code> files for server-side includes and will then
75159a79720160d33d888cf45481ef400c1e3a01nd compress the output using <module>mod_deflate</module>.</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh <highlight language="config">
7a98571671f92e53441bf24a0222768072172f90coarAddOutputFilter INCLUDES;DEFLATE shtml
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh </highlight>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen <p>If more than one filter is specified, they must be separated
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen by semicolons in the order in which they should process the
d7829068d487c77c1052fef7ad7f21d60cead2d5slive content. The <var>filter</var> argument is case-insensitive.</p>
d7829068d487c77c1052fef7ad7f21d60cead2d5slive
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <p>The <var>extension</var> argument is case-insensitive and can
d7829068d487c77c1052fef7ad7f21d60cead2d5slive be specified with or without a leading dot. Filenames may have <a
d7829068d487c77c1052fef7ad7f21d60cead2d5slive href="#multipleext">multiple extensions</a> and the
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <var>extension</var> argument will be compared against each of
d7829068d487c77c1052fef7ad7f21d60cead2d5slive them.</p>
8dc76a9a80cc7d33726252c657998f17a1e931eaminfrin
8dc76a9a80cc7d33726252c657998f17a1e931eaminfrin <p>Note that when defining a set of filters using the
4de1f28e3fa6a230f31e1fcf7484a7ec148667ebrbowen <directive module="mod_mime">AddOutputFilter</directive> directive,
8dc76a9a80cc7d33726252c657998f17a1e931eaminfrin any definition made will replace any previous definition made by
4de1f28e3fa6a230f31e1fcf7484a7ec148667ebrbowen the <directive module="mod_mime">AddOutputFilter</directive>
8dc76a9a80cc7d33726252c657998f17a1e931eaminfrin directive.</p>
8dc76a9a80cc7d33726252c657998f17a1e931eaminfrin
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh <highlight language="config">
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh# Effective filter "DEFLATE"
1449dcd10994475163af1b4ceab2a8413743e01bhumbedoohAddOutputFilter DEFLATE shtml
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar&lt;Location "/foo"&gt;
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh # Effective filter "INCLUDES", replacing "DEFLATE"
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh AddOutputFilter INCLUDES shtml
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh&lt;/Location&gt;
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar&lt;Location "/bar"&gt;
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh # Effective filter "INCLUDES;DEFLATE", replacing "DEFLATE"
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh AddOutputFilter INCLUDES;DEFLATE shtml
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh&lt;/Location&gt;
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar&lt;Location "/bar/baz"&gt;
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh # Effective filter "BUFFER", replacing "INCLUDES;DEFLATE"
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh AddOutputFilter BUFFER shtml
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh&lt;/Location&gt;
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar&lt;Location "/bar/baz/buz"&gt;
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh # No effective filter, replacing "BUFFER"
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh RemoveOutputFilter shtml
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh&lt;/Location&gt;
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh </highlight>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</usage>
44c61920e384b819aba8ad43310c67c71fa64a48rbowen<seealso><directive module="mod_mime">RemoveOutputFilter</directive></seealso>
62e106881e35e8086a5c936db3c81e34adb872aejerenkrantz<seealso><directive module="core">SetOutputFilter</directive></seealso>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<name>AddType</name>
75159a79720160d33d888cf45481ef400c1e3a01nd<description>Maps the given filename extensions onto the specified content
75159a79720160d33d888cf45481ef400c1e3a01ndtype</description>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<syntax>AddType <var>media-type</var> <var>extension</var>
75159a79720160d33d888cf45481ef400c1e3a01nd[<var>extension</var>] ...</syntax>
75159a79720160d33d888cf45481ef400c1e3a01nd<contextlist><context>server config</context><context>virtual host</context>
75159a79720160d33d888cf45481ef400c1e3a01nd<context>directory</context><context>.htaccess</context></contextlist>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<override>FileInfo</override>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<usage>
c14037646789087319802aaada2e8534ccab0158slive <p>The <directive>AddType</directive> directive maps the given
c14037646789087319802aaada2e8534ccab0158slive filename extensions onto the specified content
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding type. <var>media-type</var> is the <glossary ref="media-type">media
c14037646789087319802aaada2e8534ccab0158slive type</glossary> to use for filenames containing
c14037646789087319802aaada2e8534ccab0158slive <var>extension</var>. This mapping is added to any already in
c14037646789087319802aaada2e8534ccab0158slive force, overriding any mappings that already exist for the same
c55ffd9b94155bc792014afadd6e2c87f12113b5igalic <var>extension</var>.</p>
c55ffd9b94155bc792014afadd6e2c87f12113b5igalic
c55ffd9b94155bc792014afadd6e2c87f12113b5igalic <note>
c55ffd9b94155bc792014afadd6e2c87f12113b5igalic It is recommended that new media types be added using the
860b4efe27e7c1c9a2bf5c872b29c90f76849b51jim <directive>AddType</directive> directive rather than changing the
c55ffd9b94155bc792014afadd6e2c87f12113b5igalic <directive module="mod_mime">TypesConfig</directive> file.
c55ffd9b94155bc792014afadd6e2c87f12113b5igalic </note>
860b4efe27e7c1c9a2bf5c872b29c90f76849b51jim
75159a79720160d33d888cf45481ef400c1e3a01nd <example><title>Example</title>
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh <highlight language="config">
7a98571671f92e53441bf24a0222768072172f90coarAddType image/gif .gif
7a98571671f92e53441bf24a0222768072172f90coar </highlight>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen </example>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
9f00c9d5e1adf4fdcd4eb8b3fea25e726829e14erbowen <p>Or, to specify multiple file extensions in one directive:</p>
9f00c9d5e1adf4fdcd4eb8b3fea25e726829e14erbowen
9f00c9d5e1adf4fdcd4eb8b3fea25e726829e14erbowen <example><title>Example</title>
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh <highlight language="config">
7a98571671f92e53441bf24a0222768072172f90coarAddType image/jpeg jpeg jpg jpe
7a98571671f92e53441bf24a0222768072172f90coar </highlight>
9f00c9d5e1adf4fdcd4eb8b3fea25e726829e14erbowen </example>
9f00c9d5e1adf4fdcd4eb8b3fea25e726829e14erbowen
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <p>The <var>extension</var> argument is case-insensitive and can
d7829068d487c77c1052fef7ad7f21d60cead2d5slive be specified with or without a leading dot. Filenames may have <a
d7829068d487c77c1052fef7ad7f21d60cead2d5slive href="#multipleext">multiple extensions</a> and the
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <var>extension</var> argument will be compared against each of
d7829068d487c77c1052fef7ad7f21d60cead2d5slive them.</p>
439acee10571861c670c438038a62f90a08bf137covener
c55ffd9b94155bc792014afadd6e2c87f12113b5igalic <p>A simmilar effect to <module>mod_negotiation</module>'s
c55ffd9b94155bc792014afadd6e2c87f12113b5igalic <directive module="mod_negotiation">LanguagePriority</directive>
c55ffd9b94155bc792014afadd6e2c87f12113b5igalic can be achieved by qualifying a <var>media-type</var> with
c55ffd9b94155bc792014afadd6e2c87f12113b5igalic <code>qs</code>:</p>
c55ffd9b94155bc792014afadd6e2c87f12113b5igalic
c55ffd9b94155bc792014afadd6e2c87f12113b5igalic <example><title>Example</title>
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh <highlight language="config">
7a98571671f92e53441bf24a0222768072172f90coarAddType application/rss+xml;qs=0.8 .xml
7a98571671f92e53441bf24a0222768072172f90coar </highlight>
c55ffd9b94155bc792014afadd6e2c87f12113b5igalic </example>
c55ffd9b94155bc792014afadd6e2c87f12113b5igalic
c55ffd9b94155bc792014afadd6e2c87f12113b5igalic <p>This is useful in situations, <em>e.g.</em> when a client
c55ffd9b94155bc792014afadd6e2c87f12113b5igalic requesting <code>Accept: */*</code> can not actually processes
c55ffd9b94155bc792014afadd6e2c87f12113b5igalic the content returned by the server.</p>
c55ffd9b94155bc792014afadd6e2c87f12113b5igalic
439acee10571861c670c438038a62f90a08bf137covener <p>This directive primarily configures the content types generated for
860b4efe27e7c1c9a2bf5c872b29c90f76849b51jim static files served out of the filesystem. For resources other than
860b4efe27e7c1c9a2bf5c872b29c90f76849b51jim static files, where the generator of the response typically specifies
439acee10571861c670c438038a62f90a08bf137covener a Content-Type, this directive has no effect.</p>
439acee10571861c670c438038a62f90a08bf137covener
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</usage>
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive<seealso><directive module="core">ForceType</directive></seealso>
c55ffd9b94155bc792014afadd6e2c87f12113b5igalic<seealso><module>mod_negotiation</module></seealso>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<name>MultiviewsMatch</name>
75159a79720160d33d888cf45481ef400c1e3a01nd<description>The types of files that will be included when searching for
ac2ccd808defc1610c4ca49a71d7f3b17b190925wrowea matching file with MultiViews</description>
ac2ccd808defc1610c4ca49a71d7f3b17b190925wrowe<syntax>MultiviewsMatch Any|NegotiatedOnly|Filters|Handlers
ac2ccd808defc1610c4ca49a71d7f3b17b190925wrowe[Handlers|Filters]</syntax>
bdc0501459e883418dedb1ab621cbee8eda6a27cslive<default>MultiviewsMatch NegotiatedOnly</default>
75159a79720160d33d888cf45481ef400c1e3a01nd<contextlist><context>server config</context><context>virtual host</context>
75159a79720160d33d888cf45481ef400c1e3a01nd<context>directory</context><context>.htaccess</context></contextlist>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<override>FileInfo</override>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<usage>
75159a79720160d33d888cf45481ef400c1e3a01nd <p><directive>MultiviewsMatch</directive> permits three different
75159a79720160d33d888cf45481ef400c1e3a01nd behaviors for <a href="mod_negotiation.html">mod_negotiation</a>'s
75159a79720160d33d888cf45481ef400c1e3a01nd Multiviews feature. Multiviews allows a request for a file,
75159a79720160d33d888cf45481ef400c1e3a01nd <em>e.g.</em> <code>index.html</code>, to match any negotiated
75159a79720160d33d888cf45481ef400c1e3a01nd extensions following the base request, <em>e.g.</em>
75159a79720160d33d888cf45481ef400c1e3a01nd <code>index.html.en</code>, <code>index.html.fr</code>, or
75159a79720160d33d888cf45481ef400c1e3a01nd <code>index.html.gz</code>.</p>
75159a79720160d33d888cf45481ef400c1e3a01nd
75159a79720160d33d888cf45481ef400c1e3a01nd <p>The <code>NegotiatedOnly</code> option provides that every extension
75159a79720160d33d888cf45481ef400c1e3a01nd following the base name must correlate to a recognized
b76a31daaa6e83bb0fd627a04f20e82bffcf1df4poirier <module>mod_mime</module> extension for content negotiation, <em>e.g.</em>
75159a79720160d33d888cf45481ef400c1e3a01nd Charset, Content-Type, Language, or Encoding. This is the strictest
75159a79720160d33d888cf45481ef400c1e3a01nd implementation with the fewest unexpected side effects, and is the
75159a79720160d33d888cf45481ef400c1e3a01nd default behavior.</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen <p>To include extensions associated with Handlers and/or Filters,
75159a79720160d33d888cf45481ef400c1e3a01nd set the <directive>MultiviewsMatch</directive> directive to either
75159a79720160d33d888cf45481ef400c1e3a01nd <code>Handlers</code>, <code>Filters</code>, or both option keywords.
75159a79720160d33d888cf45481ef400c1e3a01nd If all other factors are equal, the smallest file will be served,
75159a79720160d33d888cf45481ef400c1e3a01nd <em>e.g.</em> in deciding between <code>index.html.cgi</code> of 500
75159a79720160d33d888cf45481ef400c1e3a01nd bytes and <code>index.html.pl</code> of 1000 bytes, the <code>.cgi</code>
75159a79720160d33d888cf45481ef400c1e3a01nd file would win in this example. Users of <code>.asis</code> files
75159a79720160d33d888cf45481ef400c1e3a01nd might prefer to use the Handler option, if <code>.asis</code> files are
75159a79720160d33d888cf45481ef400c1e3a01nd associated with the <code>asis-handler</code>.</p>
75159a79720160d33d888cf45481ef400c1e3a01nd
75159a79720160d33d888cf45481ef400c1e3a01nd <p>You may finally allow <code>Any</code> extensions to match, even if
460c5eb0d05efed62fd7aa35162dc7a68f026919igalic <module>mod_mime</module> doesn't recognize the extension. This can cause
6469b368ac224f0891a93e28691caf7691fa715ahumbedooh unpredictable results, such as serving .old or .bak files the webmaster
460c5eb0d05efed62fd7aa35162dc7a68f026919igalic never expected to be served.</p>
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive <p>For example, the following configuration will allow handlers
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive and filters to participate in Multviews, but will exclude unknown
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive files:</p>
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh <highlight language="config">
7a98571671f92e53441bf24a0222768072172f90coarMultiviewsMatch Handlers Filters
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh </highlight>
845258fbf5102b8b09fe9b7f4cb4ea4c089344c3poirier
845258fbf5102b8b09fe9b7f4cb4ea4c089344c3poirier <p><directive>MultiviewsMatch</directive> is not allowed in a
845258fbf5102b8b09fe9b7f4cb4ea4c089344c3poirier <directive type="section" module="core">Location</directive> or <directive
845258fbf5102b8b09fe9b7f4cb4ea4c089344c3poirier type="section" module="core">LocationMatch</directive> section.</p>
845258fbf5102b8b09fe9b7f4cb4ea4c089344c3poirier
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</usage>
75569f53579b42dc17cf097015b6b055c01e6875slive<seealso><directive module="core">Options</directive></seealso>
75159a79720160d33d888cf45481ef400c1e3a01nd<seealso><module>mod_negotiation</module></seealso>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<name>DefaultLanguage</name>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<description>Defines a default language-tag to be sent in the Content-Language
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fieldingheader field for all resources in the current context that have not been
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fieldingassigned a language-tag by some other means.</description>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<syntax>DefaultLanguage <var>language-tag</var></syntax>
75159a79720160d33d888cf45481ef400c1e3a01nd<contextlist><context>server config</context><context>virtual host</context>
75159a79720160d33d888cf45481ef400c1e3a01nd<context>directory</context><context>.htaccess</context></contextlist>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<override>FileInfo</override>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<usage>
75159a79720160d33d888cf45481ef400c1e3a01nd <p>The <directive>DefaultLanguage</directive> directive tells Apache
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding that all resources in the directive's scope (<em>e.g.</em>, all resources
75159a79720160d33d888cf45481ef400c1e3a01nd covered by the current <directive module="core" type="section"
75159a79720160d33d888cf45481ef400c1e3a01nd >Directory</directive> container) that don't have an explicit language
75159a79720160d33d888cf45481ef400c1e3a01nd extension (such as <code>.fr</code> or <code>.de</code> as configured
75159a79720160d33d888cf45481ef400c1e3a01nd by <directive module="mod_mime">AddLanguage</directive>) should be
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding assigned a Content-Language of <var>language-tag</var>. This allows
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding entire directory trees to be marked as containing Dutch content, for
75159a79720160d33d888cf45481ef400c1e3a01nd instance, without having to rename each file. Note that unlike using
75159a79720160d33d888cf45481ef400c1e3a01nd extensions to specify languages, <directive>DefaultLanguage</directive>
75159a79720160d33d888cf45481ef400c1e3a01nd can only specify a single language.</p>
75159a79720160d33d888cf45481ef400c1e3a01nd
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <p>If no <directive>DefaultLanguage</directive> directive is in force
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen and a file does not have any language extensions as configured
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding by <directive module="mod_mime">AddLanguage</directive>, then no
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding Content-Language header field will be generated.</p>
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive
75159a79720160d33d888cf45481ef400c1e3a01nd <example><title>Example</title>
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh <highlight language="config">
7a98571671f92e53441bf24a0222768072172f90coarDefaultLanguage en
7a98571671f92e53441bf24a0222768072172f90coar </highlight>
75159a79720160d33d888cf45481ef400c1e3a01nd </example>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</usage>
c3fcea07965f59723831e23da647a77518285b8eslive<seealso><module>mod_negotiation</module></seealso>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
21b70e758d670601065db7b05e16441226e4e9b4jerenkrantz<directivesynopsis>
21b70e758d670601065db7b05e16441226e4e9b4jerenkrantz<name>ModMimeUsePathInfo</name>
75159a79720160d33d888cf45481ef400c1e3a01nd<description>Tells <module>mod_mime</module> to treat <code>path_info</code>
75159a79720160d33d888cf45481ef400c1e3a01ndcomponents as part of the filename</description>
21b70e758d670601065db7b05e16441226e4e9b4jerenkrantz<syntax>ModMimeUsePathInfo On|Off</syntax>
75159a79720160d33d888cf45481ef400c1e3a01nd<default>ModMimeUsePathInfo Off</default>
75159a79720160d33d888cf45481ef400c1e3a01nd<contextlist><context>directory</context></contextlist>
21b70e758d670601065db7b05e16441226e4e9b4jerenkrantz
21b70e758d670601065db7b05e16441226e4e9b4jerenkrantz<usage>
df5db89264efca559e954ca181763a0d3ef2f844nd <p>The <directive>ModMimeUsePathInfo</directive> directive is used to
75159a79720160d33d888cf45481ef400c1e3a01nd combine the filename with the <code>path_info</code> URL component to
75159a79720160d33d888cf45481ef400c1e3a01nd apply <module>mod_mime</module>'s directives to the request. The default
75159a79720160d33d888cf45481ef400c1e3a01nd value is <code>Off</code> - therefore, the <code>path_info</code>
75159a79720160d33d888cf45481ef400c1e3a01nd component is ignored.</p>
21b70e758d670601065db7b05e16441226e4e9b4jerenkrantz
df5db89264efca559e954ca181763a0d3ef2f844nd <p>This directive is recommended when you have a virtual filesystem.</p>
21b70e758d670601065db7b05e16441226e4e9b4jerenkrantz
df5db89264efca559e954ca181763a0d3ef2f844nd <example><title>Example</title>
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh <highlight language="config">
7a98571671f92e53441bf24a0222768072172f90coarModMimeUsePathInfo On
7a98571671f92e53441bf24a0222768072172f90coar </highlight>
df5db89264efca559e954ca181763a0d3ef2f844nd </example>
21b70e758d670601065db7b05e16441226e4e9b4jerenkrantz
8d977fd1ae9d31c7437bd9933c58358a703d844digalic <p>If you have a request for <code>/index.php/foo.shtml</code>
8d977fd1ae9d31c7437bd9933c58358a703d844digalic <module>mod_mime</module> will now treat the
295827f85eaaf17d313255207cbffea9b0f1dcf1igalic incoming request as <code>/index.php/foo.shtml</code> and directives
295827f85eaaf17d313255207cbffea9b0f1dcf1igalic like <code>AddOutputFilter INCLUDES .shtml</code> will add the
295827f85eaaf17d313255207cbffea9b0f1dcf1igalic <code>INCLUDES</code> filter to the request. If <directive
295827f85eaaf17d313255207cbffea9b0f1dcf1igalic >ModMimeUsePathInfo</directive> is not set, the
8d977fd1ae9d31c7437bd9933c58358a703d844digalic <code>INCLUDES</code> filter will not be added. This will work
8d977fd1ae9d31c7437bd9933c58358a703d844digalic analogously for virtual paths, such as those defined by
60ee73f225a3fd9bb1e561ec3aadda7fcd8243a9igalic <directive type="section">Location</directive></p>
21b70e758d670601065db7b05e16441226e4e9b4jerenkrantz</usage>
75159a79720160d33d888cf45481ef400c1e3a01nd<seealso><directive module="core">AcceptPathInfo</directive></seealso>
21b70e758d670601065db7b05e16441226e4e9b4jerenkrantz</directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<name>RemoveCharset</name>
75569f53579b42dc17cf097015b6b055c01e6875slive<description>Removes any character set associations for a set of file
75569f53579b42dc17cf097015b6b055c01e6875sliveextensions</description>
75159a79720160d33d888cf45481ef400c1e3a01nd<syntax>RemoveCharset <var>extension</var> [<var>extension</var>]
75159a79720160d33d888cf45481ef400c1e3a01nd...</syntax>
75159a79720160d33d888cf45481ef400c1e3a01nd<contextlist><context>virtual host</context><context>directory</context>
75159a79720160d33d888cf45481ef400c1e3a01nd<context>.htaccess</context></contextlist>
75159a79720160d33d888cf45481ef400c1e3a01nd<override>FileInfo</override>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<usage>
75159a79720160d33d888cf45481ef400c1e3a01nd <p>The <directive>RemoveCharset</directive> directive removes any
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen character set associations for files with the given extensions.
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen This allows <code>.htaccess</code> files in subdirectories to
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen undo any associations inherited from parent directories or the
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen server config files.</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <p>The <var>extension</var> argument is case-insensitive and can
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen be specified with or without a leading dot.</p>
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive
75159a79720160d33d888cf45481ef400c1e3a01nd <example><title>Example</title>
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh <highlight language="config">
7a98571671f92e53441bf24a0222768072172f90coarRemoveCharset .html .shtml
7a98571671f92e53441bf24a0222768072172f90coar </highlight>
75159a79720160d33d888cf45481ef400c1e3a01nd </example>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</usage>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<name>RemoveEncoding</name>
75569f53579b42dc17cf097015b6b055c01e6875slive<description>Removes any content encoding associations for a set of file
75569f53579b42dc17cf097015b6b055c01e6875sliveextensions</description>
75159a79720160d33d888cf45481ef400c1e3a01nd<syntax>RemoveEncoding <var>extension</var> [<var>extension</var>]
75159a79720160d33d888cf45481ef400c1e3a01nd...</syntax>
75159a79720160d33d888cf45481ef400c1e3a01nd<contextlist><context>virtual host</context><context>directory</context>
75159a79720160d33d888cf45481ef400c1e3a01nd<context>.htaccess</context></contextlist>
75159a79720160d33d888cf45481ef400c1e3a01nd<override>FileInfo</override>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<usage>
75159a79720160d33d888cf45481ef400c1e3a01nd <p>The <directive>RemoveEncoding</directive> directive removes any
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen encoding associations for files with the given extensions. This
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen allows <code>.htaccess</code> files in subdirectories to undo
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen any associations inherited from parent directories or the
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen server config files. An example of its use might be:</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
75159a79720160d33d888cf45481ef400c1e3a01nd <example><title>/foo/.htaccess:</title>
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh <highlight language="config">
1449dcd10994475163af1b4ceab2a8413743e01bhumbedoohAddEncoding x-gzip .gz
1449dcd10994475163af1b4ceab2a8413743e01bhumbedoohAddType text/plain .asc
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar&lt;Files "*.gz.asc"&gt;
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh RemoveEncoding .gz
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh&lt;/Files&gt;
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh </highlight>
75159a79720160d33d888cf45481ef400c1e3a01nd </example>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen <p>This will cause <code>foo.gz</code> to be marked as being
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen encoded with the gzip method, but <code>foo.gz.asc</code> as an
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen unencoded plaintext file.</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
75159a79720160d33d888cf45481ef400c1e3a01nd <note><title>Note</title>
75159a79720160d33d888cf45481ef400c1e3a01nd <p><directive>RemoveEncoding</directive> directives are processed
75159a79720160d33d888cf45481ef400c1e3a01nd <em>after</em> any <directive module="mod_mime">AddEncoding</directive>
75159a79720160d33d888cf45481ef400c1e3a01nd directives, so it is possible they may undo the effects of the latter
75159a79720160d33d888cf45481ef400c1e3a01nd if both occur within the same directory configuration.</p>
75159a79720160d33d888cf45481ef400c1e3a01nd </note>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <p>The <var>extension</var> argument is case-insensitive and can
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen be specified with or without a leading dot.</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</usage>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<name>RemoveHandler</name>
75569f53579b42dc17cf097015b6b055c01e6875slive<description>Removes any handler associations for a set of file
75569f53579b42dc17cf097015b6b055c01e6875sliveextensions</description>
75159a79720160d33d888cf45481ef400c1e3a01nd<syntax>RemoveHandler <var>extension</var> [<var>extension</var>]
75159a79720160d33d888cf45481ef400c1e3a01nd...</syntax>
75159a79720160d33d888cf45481ef400c1e3a01nd<contextlist><context>virtual host</context><context>directory</context>
75159a79720160d33d888cf45481ef400c1e3a01nd<context>.htaccess</context></contextlist>
75159a79720160d33d888cf45481ef400c1e3a01nd<override>FileInfo</override>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<usage>
75159a79720160d33d888cf45481ef400c1e3a01nd <p>The <directive>RemoveHandler</directive> directive removes any
75159a79720160d33d888cf45481ef400c1e3a01nd handler associations for files with the given extensions. This allows
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen <code>.htaccess</code> files in subdirectories to undo any
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen associations inherited from parent directories or the server
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen config files. An example of its use might be:</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
75159a79720160d33d888cf45481ef400c1e3a01nd <example><title>/foo/.htaccess:</title>
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh <highlight language="config">
7a98571671f92e53441bf24a0222768072172f90coarAddHandler server-parsed .html
7a98571671f92e53441bf24a0222768072172f90coar </highlight>
75159a79720160d33d888cf45481ef400c1e3a01nd </example>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
75159a79720160d33d888cf45481ef400c1e3a01nd <example><title>/foo/bar/.htaccess:</title>
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh <highlight language="config">
7a98571671f92e53441bf24a0222768072172f90coarRemoveHandler .html
7a98571671f92e53441bf24a0222768072172f90coar </highlight>
75159a79720160d33d888cf45481ef400c1e3a01nd </example>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c3fcea07965f59723831e23da647a77518285b8eslive <p>This has the effect of returning <code>.html</code> files in
c3fcea07965f59723831e23da647a77518285b8eslive the <code>/foo/bar</code> directory to being treated as normal
75159a79720160d33d888cf45481ef400c1e3a01nd files, rather than as candidates for parsing (see the <module
75159a79720160d33d888cf45481ef400c1e3a01nd >mod_include</module> module).</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <p>The <var>extension</var> argument is case-insensitive and can
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen be specified with or without a leading dot.</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</usage>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<name>RemoveInputFilter</name>
75569f53579b42dc17cf097015b6b055c01e6875slive<description>Removes any input filter associations for a set of file
75569f53579b42dc17cf097015b6b055c01e6875sliveextensions</description>
75159a79720160d33d888cf45481ef400c1e3a01nd<syntax>RemoveInputFilter <var>extension</var> [<var>extension</var>]
75159a79720160d33d888cf45481ef400c1e3a01nd...</syntax>
75159a79720160d33d888cf45481ef400c1e3a01nd<contextlist><context>virtual host</context><context>directory</context>
75159a79720160d33d888cf45481ef400c1e3a01nd<context>.htaccess</context></contextlist>
75159a79720160d33d888cf45481ef400c1e3a01nd<override>FileInfo</override>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
860b4efe27e7c1c9a2bf5c872b29c90f76849b51jim<usage>
75159a79720160d33d888cf45481ef400c1e3a01nd <p>The <directive>RemoveInputFilter</directive> directive removes any
2ca3062001e1ea6e0b3b8060e1150f3a5435311bnoodl input <a href="/filter.html">filter</a> associations for files with
2ca3062001e1ea6e0b3b8060e1150f3a5435311bnoodl the given extensions.
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen This allows <code>.htaccess</code> files in subdirectories to
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen undo any associations inherited from parent directories or the
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen server config files.</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <p>The <var>extension</var> argument is case-insensitive and can
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen be specified with or without a leading dot.</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</usage>
62e106881e35e8086a5c936db3c81e34adb872aejerenkrantz<seealso><directive module="mod_mime">AddInputFilter</directive></seealso>
62e106881e35e8086a5c936db3c81e34adb872aejerenkrantz<seealso><directive module="core">SetInputFilter</directive></seealso>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<name>RemoveLanguage</name>
75569f53579b42dc17cf097015b6b055c01e6875slive<description>Removes any language associations for a set of file
75569f53579b42dc17cf097015b6b055c01e6875sliveextensions</description>
75159a79720160d33d888cf45481ef400c1e3a01nd<syntax>RemoveLanguage <var>extension</var> [<var>extension</var>]
75159a79720160d33d888cf45481ef400c1e3a01nd...</syntax>
75159a79720160d33d888cf45481ef400c1e3a01nd<contextlist><context>virtual host</context><context>directory</context>
75159a79720160d33d888cf45481ef400c1e3a01nd<context>.htaccess</context></contextlist>
75159a79720160d33d888cf45481ef400c1e3a01nd<override>FileInfo</override>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<usage>
75159a79720160d33d888cf45481ef400c1e3a01nd <p>The <directive>RemoveLanguage</directive> directive removes any
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen language associations for files with the given extensions. This
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen allows <code>.htaccess</code> files in subdirectories to undo
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen any associations inherited from parent directories or the
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen server config files.</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <p>The <var>extension</var> argument is case-insensitive and can
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen be specified with or without a leading dot.</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</usage>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<name>RemoveOutputFilter</name>
75569f53579b42dc17cf097015b6b055c01e6875slive<description>Removes any output filter associations for a set of file
75569f53579b42dc17cf097015b6b055c01e6875sliveextensions</description>
75159a79720160d33d888cf45481ef400c1e3a01nd<syntax>RemoveOutputFilter <var>extension</var> [<var>extension</var>]
75159a79720160d33d888cf45481ef400c1e3a01nd...</syntax>
75159a79720160d33d888cf45481ef400c1e3a01nd<contextlist><context>virtual host</context><context>directory</context>
75159a79720160d33d888cf45481ef400c1e3a01nd<context>.htaccess</context></contextlist>
75159a79720160d33d888cf45481ef400c1e3a01nd<override>FileInfo</override>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
860b4efe27e7c1c9a2bf5c872b29c90f76849b51jim<usage>
75159a79720160d33d888cf45481ef400c1e3a01nd <p>The <directive>RemoveOutputFilter</directive> directive removes any
2ca3062001e1ea6e0b3b8060e1150f3a5435311bnoodl output <a href="/filter.html">filter</a> associations for files with
2ca3062001e1ea6e0b3b8060e1150f3a5435311bnoodl the given extensions.
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen This allows <code>.htaccess</code> files in subdirectories to
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen undo any associations inherited from parent directories or the
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen server config files.</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <p>The <var>extension</var> argument is case-insensitive and can
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen be specified with or without a leading dot.</p>
44c61920e384b819aba8ad43310c67c71fa64a48rbowen
44c61920e384b819aba8ad43310c67c71fa64a48rbowen <example><title>Example</title>
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh <highlight language="config">
7a98571671f92e53441bf24a0222768072172f90coarRemoveOutputFilter shtml
7a98571671f92e53441bf24a0222768072172f90coar </highlight>
44c61920e384b819aba8ad43310c67c71fa64a48rbowen </example>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</usage>
44c61920e384b819aba8ad43310c67c71fa64a48rbowen<seealso><directive module="mod_mime">AddOutputFilter</directive></seealso>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<name>RemoveType</name>
75569f53579b42dc17cf097015b6b055c01e6875slive<description>Removes any content type associations for a set of file
75569f53579b42dc17cf097015b6b055c01e6875sliveextensions</description>
75159a79720160d33d888cf45481ef400c1e3a01nd<syntax>RemoveType <var>extension</var> [<var>extension</var>]
75159a79720160d33d888cf45481ef400c1e3a01nd...</syntax>
75159a79720160d33d888cf45481ef400c1e3a01nd<contextlist><context>virtual host</context><context>directory</context>
75159a79720160d33d888cf45481ef400c1e3a01nd<context>.htaccess</context></contextlist>
75159a79720160d33d888cf45481ef400c1e3a01nd<override>FileInfo</override>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<usage>
c14037646789087319802aaada2e8534ccab0158slive <p>The <directive>RemoveType</directive> directive removes any
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <glossary ref="media-type">media type</glossary> associations for files with
c14037646789087319802aaada2e8534ccab0158slive the given extensions. This allows <code>.htaccess</code> files in
c14037646789087319802aaada2e8534ccab0158slive subdirectories to undo any associations inherited from parent
c14037646789087319802aaada2e8534ccab0158slive directories or the server config files. An example of its use
c14037646789087319802aaada2e8534ccab0158slive might be:</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
75159a79720160d33d888cf45481ef400c1e3a01nd <example><title>/foo/.htaccess:</title>
1449dcd10994475163af1b4ceab2a8413743e01bhumbedooh <highlight language="config">
7a98571671f92e53441bf24a0222768072172f90coarRemoveType .cgi
7a98571671f92e53441bf24a0222768072172f90coar </highlight>
75159a79720160d33d888cf45481ef400c1e3a01nd </example>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen <p>This will remove any special handling of <code>.cgi</code>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen files in the <code>/foo/</code> directory and any beneath it,
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding causing responses containing those files to omit the HTTP
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding Content-Type header field.</p>
75159a79720160d33d888cf45481ef400c1e3a01nd
75159a79720160d33d888cf45481ef400c1e3a01nd <note><title>Note</title>
75159a79720160d33d888cf45481ef400c1e3a01nd <p><directive>RemoveType</directive> directives are processed
75159a79720160d33d888cf45481ef400c1e3a01nd <em>after</em> any <directive module="mod_mime">AddType</directive>
75159a79720160d33d888cf45481ef400c1e3a01nd directives, so it is possible they may undo the effects of the
75159a79720160d33d888cf45481ef400c1e3a01nd latter if both occur within the same directory configuration.</p>
75159a79720160d33d888cf45481ef400c1e3a01nd </note>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
d7829068d487c77c1052fef7ad7f21d60cead2d5slive <p>The <var>extension</var> argument is case-insensitive and can
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen be specified with or without a leading dot.</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</usage>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<name>TypesConfig</name>
75159a79720160d33d888cf45481ef400c1e3a01nd<description>The location of the <code>mime.types</code> file</description>
75159a79720160d33d888cf45481ef400c1e3a01nd<syntax>TypesConfig <var>file-path</var></syntax>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<default>TypesConfig conf/mime.types</default>
75159a79720160d33d888cf45481ef400c1e3a01nd<contextlist><context>server config</context></contextlist>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen<usage>
c14037646789087319802aaada2e8534ccab0158slive <p>The <directive>TypesConfig</directive> directive sets the
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding location of the <glossary ref="media-type">media types</glossary>
c14037646789087319802aaada2e8534ccab0158slive configuration file. <var>File-path</var> is relative to the
c14037646789087319802aaada2e8534ccab0158slive <directive module="core">ServerRoot</directive>. This file sets
75159a79720160d33d888cf45481ef400c1e3a01nd the default list of mappings from filename extensions to content
5902252f1e4f438c7dcfb66111526bf8865dfb4aigalic types. Most administrators use the <code>mime.types</code> file
5902252f1e4f438c7dcfb66111526bf8865dfb4aigalic provided by their OS, which associates common filename
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding extensions with the official list of IANA registered media types
c14037646789087319802aaada2e8534ccab0158slive maintained at <a href=
2fe6dbdcdf06a7b17004f5c138e362ad8ab9c27frbowen "http://www.iana.org/assignments/media-types/index.html"
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding >http://www.iana.org/assignments/media-types/index.html</a>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding as well as a large number of unofficial types. This
c14037646789087319802aaada2e8534ccab0158slive simplifies the <code>httpd.conf</code> file by providing the
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive majority of media-type definitions, and may be overridden by
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive <directive module="mod_mime">AddType</directive> directives as
c14037646789087319802aaada2e8534ccab0158slive needed. You should not edit the <code>mime.types</code> file,
c14037646789087319802aaada2e8534ccab0158slive because it may be replaced when you upgrade your server.</p>
75159a79720160d33d888cf45481ef400c1e3a01nd
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive <p>The file contains lines in the format of the arguments to
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive an <directive module="mod_mime">AddType</directive> directive:</p>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen <example>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <var>media-type</var> [<var>extension</var>] ...
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen </example>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
75159a79720160d33d888cf45481ef400c1e3a01nd <p>The case of the extension does not matter. Blank lines, and lines
5902252f1e4f438c7dcfb66111526bf8865dfb4aigalic beginning with a hash character (<code>#</code>) are ignored.
5902252f1e4f438c7dcfb66111526bf8865dfb4aigalic Empty lines are there for completeness (of the mime.types file).
5902252f1e4f438c7dcfb66111526bf8865dfb4aigalic Apache httpd can still determine these types with <module
5902252f1e4f438c7dcfb66111526bf8865dfb4aigalic >mod_mime_magic</module>.
5902252f1e4f438c7dcfb66111526bf8865dfb4aigalic </p>
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive
75159a79720160d33d888cf45481ef400c1e3a01nd <note>
75159a79720160d33d888cf45481ef400c1e3a01nd Please do <strong>not</strong> send requests to the Apache HTTP
75159a79720160d33d888cf45481ef400c1e3a01nd Server Project to add any new entries in the distributed
75159a79720160d33d888cf45481ef400c1e3a01nd <code>mime.types</code> file unless (1) they are already
75159a79720160d33d888cf45481ef400c1e3a01nd registered with IANA, and (2) they use widely accepted,
75159a79720160d33d888cf45481ef400c1e3a01nd non-conflicting filename extensions across platforms.
75159a79720160d33d888cf45481ef400c1e3a01nd <code>category/x-subtype</code> requests will be automatically
75159a79720160d33d888cf45481ef400c1e3a01nd rejected, as will any new two-letter extensions as they will
75159a79720160d33d888cf45481ef400c1e3a01nd likely conflict later with the already crowded language and
75159a79720160d33d888cf45481ef400c1e3a01nd character set namespace.
75159a79720160d33d888cf45481ef400c1e3a01nd </note>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</usage>
eabaccd4bdeaafc3d0c21886863bd9acefea99bbslive<seealso><module>mod_mime_magic</module></seealso>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen</directivesynopsis>
c053576cdcd7389a1e11dd9c656f1f723ae854bcrbowen
75159a79720160d33d888cf45481ef400c1e3a01nd</modulesynopsis>