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