summaryrefslogtreecommitdiff
path: root/docs/manual/mod/mod_mime.html
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2001-09-01 02:25:22 +0000
committerWilliam A. Rowe Jr <wrowe@apache.org>2001-09-01 02:25:22 +0000
commitaa5e641aa7d943acd60ab60c9d48dc99b419c280 (patch)
treee17c2d6015476a0a6d87e358bf10621ea583fcf8 /docs/manual/mod/mod_mime.html
parent640e927610907422951b0dbd1211a1bb5c2bdce0 (diff)
downloadhttpd-aa5e641aa7d943acd60ab60c9d48dc99b419c280.tar.gz
Move ForceType/SetHandler from mod_mime to core, copy the Set*Filter
description for Add*Filter in mod_mime, and cross reference them. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90864 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/manual/mod/mod_mime.html')
-rw-r--r--docs/manual/mod/mod_mime.html338
1 files changed, 224 insertions, 114 deletions
diff --git a/docs/manual/mod/mod_mime.html b/docs/manual/mod/mod_mime.html
index 3736515256..89e6d3de4d 100644
--- a/docs/manual/mod/mod_mime.html
+++ b/docs/manual/mod/mod_mime.html
@@ -15,8 +15,9 @@
<!--#include virtual="header.html" -->
<h1 align="center">Module mod_mime</h1>
-<p>This module provides for determining the types of files
-from the filename and for association of handlers with files.</p>
+<p>This module associates the request filename's extensions (e.g. .html) with
+the file's behavior (handlers and filters) and content (mime-type, language,
+character set and encoding.)</p>
<p><a
href="module-dict.html#Status"
@@ -36,48 +37,83 @@ rel="Help"
<h2>Summary</h2>
-This module is used to determine various bits of "meta information"
-about documents. This information relates to the content of the
-document and is returned to the browser or used in content-negotiation
-within the server. In addition, a "handler" can be set for a document,
-which determines how the document will be processed within the server.
+This module is used to associate various bits of "meta information" with
+files by their filename extensions. This information relates the filename
+of the document to it's mime-type, language, character set and encoding.
+This information is sent to the browser, and participates in content
+negotiation, so the user's preferences are respected when choosing one of
+several possible files to serve. See
+<a href="mod_negotiation">mod_negotiation</a> for more information about
+content negotation.
+
+<P>
+
+The directives <a href="#addhandler">AddHandler</a>,
+<a href="#addoutputfilter">AddOutputFilter</a>, and
+<a href="#addinputfilter">AddInputFilter</a> control the modules or
+scripts that serve the document.
+
+<P>
+
+In addition, mod_mime may define the "handler" for a document, which controls
+which module or script will serve the document. With the introduction of
+"filters" in Apache 2.0, mod_mime can also define the filters that the
+the content should be processed through (e.g. the Includes output filter for
+server side scripting) and what filters the client request and POST content
+should be processed through (the input filters.)
<P>
The directives <a href="#addcharset">AddCharset</a>,
-<a href="#addencoding">AddEncoding</a>, <a href="#addhandler">AddHandler</a>,
-<a href="#addlanguage">AddLanguage</a> and <a href="#addtype">AddType</a>
-are all used to map file extensions onto the meta-information for that
-file. Respectively they set the character set, content-encoding, handler,
-content-language, and MIME-type (content-type) of documents. The
-directive <a href="#typesconfig">TypesConfig</a> is used to specify a
-file which also maps extensions onto MIME types. The directives <a
-href="#forcetype">ForceType</a> and <a
-href="#sethandler">SetHandler</a> are used to associated all the files
-in a given location (<em>e.g.</em>, a particular directory) onto a particular
-MIME type or handler.
+<a href="#addencoding">AddEncoding</a>, <a href="#addlanguage">AddLanguage</a>
+and <a href="#addtype">AddType</a> are all used to map file extensions onto
+the meta-information for that file. Respectively they set the character set,
+content-encoding, content-language, and MIME-type (content-type) of documents.
+
+<P>
+
+The directive <a href="#typesconfig">TypesConfig</a> is used to specify a
+file which also maps extensions onto MIME types. Most administrators use
+the provided mime.types file which associates common filename extensions
+with IANA registered content types. This simplifies the httpd.conf file
+by providing the
+
+<P>
+
+The core directives <a href="core.html#forcetype">ForceType</a> and
+<a href="core.html#sethandler">SetHandler</a> are used to associate
+all the files in a given container (<em>e.g.</em>, &lt;location&gt;,
+&lt;directory&gt;, or &lt;Files&gt;) with a particular MIME-type or
+handler. These settings override any filename extension mappings
+defined in mod_mime.
<P>
Note that changing the type or encoding of a file does not change the
value of the <CODE>Last-Modified</code> header. Thus, previously cached
copies may still be used by a client or proxy, with the previous headers.
+If you change the meta-information (language, content type, character set
+or encoding) you may need to 'touch' affected files (updating their last
+modified date) to ensure that all visitors are receive the corrected
+content headers.
<h2>Directives</h2>
<ul>
<li><a href="#addcharset">AddCharset</a></li>
<li><a href="#addencoding">AddEncoding</a>
<li><a href="#addhandler">AddHandler</a>
+<li><a href="#addinputfilter">AddInputFilter</a>
<li><a href="#addlanguage">AddLanguage</a>
+<li><a href="#addoutputfilter">AddOutputFilter</a>
<li><a href="#addtype">AddType</a>
<li><a href="#defaultlanguage">DefaultLanguage</a>
-<li><a href="#forcetype">ForceType</a>
<li><a href="#removecharset">RemoveCharset</a>
<li><a href="#removeencoding">RemoveEncoding</a>
<li><a href="#removehandler">RemoveHandler</a>
+<li><a href="#removeinputfilter">RemoveInputFilter</a>
<li><a href="#removelanguage">RemoveLanguage</a>
+<li><a href="#removeoutputfilter">RemoveOutputFilter</a>
<li><a href="#removetype">RemoveType</a>
-<li><a href="#sethandler">SetHandler</a>
<li><a href="#typesconfig">TypesConfig</a>
</ul>
@@ -188,7 +224,7 @@ Content-Type: text/plain; charset=ISO-8859-2
<p>
The language specification is the two-letter abbreviation for the
language. The <samp>charset</samp> is the name of the particular
-character set which should be used.
+character set which should be used.</p>
<hr>
@@ -362,7 +398,48 @@ be specified with or without a leading dot.</p>
<P>
<strong>See also</strong>: <a href="#multipleext">Files with
-multiple extensions</a>
+multiple extensions</a></p>
+
+<HR>
+
+<H2><A NAME="addinputfilter">AddInputFilter directive</A></H2>
+<P><A
+ HREF="directive-dict.html#Syntax"
+ REL="Help"
+><STRONG>Syntax:</STRONG></A> AddInputFilter <EM>filter</EM>[<EM
+>;filter</EM>...] extension</em> [<em>extension</em> ...]<BR>
+<A
+ HREF="directive-dict.html#Default"
+ REL="Help"
+><STRONG>Default:</STRONG></A> none<BR>
+<A
+ HREF="directive-dict.html#Context"
+ REL="Help"
+><STRONG>Context:</STRONG></A> directory, files, location, .htaccess<BR>
+<A
+ HREF="directive-dict.html#Status"
+ REL="Help"
+><STRONG>Status:</STRONG></A> mod_mime<BR>
+<a
+ href="directive-dict.html#Compatibility"
+ rel="Help"
+><strong>Compatibility:</strong></a> AddInputFilter is only available in
+Apache 2.0.26 and later.<P>
+
+<P>AddInputFilter maps the filename extensions <em>extension</em> to the
+filter or filters which will process client requests and POST input
+when they are received by the server. This is in addition to any
+filters defined elsewhere, including the
+<a href="core.html#setinputfilter">SetInputFilter</a> directive.
+This mapping is merged over any already in force, overriding any
+mappings that already exist for the same <em>extension</em>.</p>
+
+<p>If more than one filter is specified, they must be seperated by
+semicolons in the order in which they should process the content. Both
+the filter and <em>extension</em> arguments are case-insensitive, and
+the extension may be specified with or without a leading dot.</p>
+
+<p>See also the <a href="../filter.html">Filters</a> documentation.</p>
<hr>
@@ -433,11 +510,56 @@ be specified with or without a leading dot.</p>
<P>
<strong>See also</strong>: <a href="#multipleext">Files with
-multiple extensions</a>
-<br>
-<strong>See also</strong>: <a
-href="./mod_negotiation.html">mod_negotiation</a>
-</P>
+multiple extensions</a>, <a href="./mod_negotiation.html"
+>mod_negotiation</a></P>
+
+<HR>
+<H2><A NAME="addoutputfilter">AddOutputFilter directive</A></H2>
+<P><A
+ HREF="directive-dict.html#Syntax"
+ REL="Help"
+><STRONG>Syntax:</STRONG></A> AddOutputFilter <EM>filter</EM>[<EM
+>;filter</EM>...] extension</em> [<em>extension</em> ...]<BR>
+<A
+ HREF="directive-dict.html#Default"
+ REL="Help"
+><STRONG>Default:</STRONG></A> none<BR>
+<A
+ HREF="directive-dict.html#Context"
+ REL="Help"
+><STRONG>Context:</STRONG></A> directory, files, location, .htaccess<BR>
+<A
+ HREF="directive-dict.html#Status"
+ REL="Help"
+><STRONG>Status:</STRONG></A> mod_mime<BR>
+<a
+ href="directive-dict.html#Compatibility"
+ rel="Help"
+><strong>Compatibility:</strong></a> AddOutputFilter is only available in
+Apache 2.0.26 and later.<P>
+
+
+<P>The <code>AddOutputFilter</code> directive maps the filename extensions
+<em>extension</em> to the filters which will process responses from the
+server before they are sent to the client. This is in addition to any
+filters defined elsewhere, including the
+<a href="core.html#setoutputfilter">SetOutputFilter</a> directive.
+This mapping is merged over any already in force, overriding any
+mappings that already exist for the same <em>extension</em>.</p>
+
+For example, the following configuration will process all .shtml files
+for server-side includes.</P>
+
+<BLOCKQUOTE><CODE>
+&nbsp;&nbsp;AddOutputFilter INCLUDES shtml<BR>
+</CODE></BLOCKQUOTE>
+
+<p>If more than one filter is specified, they must be seperated by
+semicolons in the order in which they should process the content. Both
+the filter and <em>extension</em> arguments are case-insensitive, and
+the extension may be specified with or without a leading dot.</p>
+
+<p>See also the <a href="../filter.html">Filters</a> documentation.</p>
<hr>
@@ -487,7 +609,7 @@ be specified with or without a leading dot.</p>
<P>
<strong>See also</strong>: <a href="#multipleext">Files with
-multiple extensions</a>
+multiple extensions</a></p>
<hr>
@@ -538,50 +660,12 @@ language attribute.
<P>
-<strong>See also</strong>: <a
-href="./mod_negotiation.html">mod_negotiation</a>
-<br>
<strong>See also</strong>: <a href="#multipleext">Files with
-multiple extensions</a>
+multiple extensions</a>, <a href="./mod_negotiation.html"
+>mod_negotiation</a></P>
<hr>
-<h2><a name="forcetype">ForceType</a> directive</h2>
-
-<a
- href="directive-dict.html#Syntax"
- rel="Help"
-><strong>Syntax:</strong></a> ForceType <em>media-type</em><br>
-<a
- href="directive-dict.html#Context"
- rel="Help"
-><strong>Context:</strong></a> directory, .htaccess<br>
-<a
- href="directive-dict.html#Status"
- rel="Help"
-><strong>Status:</strong></a> Base<br>
-<a
- href="directive-dict.html#Module"
- rel="Help"
-><strong>Module:</strong></a> mod_mime<br>
-<a
- href="directive-dict.html#Compatibility"
- rel="Help"
-><strong>Compatibility:</strong></a> ForceType is only available in Apache
-1.1 and later.<P>
-
-<P>When placed into an <code>.htaccess</code> file or a
-<code>&lt;Directory&gt;</code> or <code>&lt;Location&gt;</code> section,
-this directive forces all matching files to be served
-as the content type given by <em>media type</em>. For example, if you
-had a directory full of GIF files, but did not want to label them all with
-".gif", you might want to use:
-<pre>
- ForceType image/gif
-</pre>
-<P>Note that this will override any filename extensions that might determine
-the media type.</P><hr>
-
<h2><a name="removecharset">RemoveCharset</a> directive</h2>
<a
@@ -727,6 +811,42 @@ be specified with or without a leading dot.</p>
<hr>
+<h2><a name="removeinputfilter">RemoveInputFilter</a> directive</h2>
+
+<a
+ href="directive-dict.html#Syntax"
+ rel="Help"
+><strong>Syntax:</strong></a> RemoveInputFilter <em>extension</em>
+ [<em>extension</em>] ...<br>
+<a
+ href="directive-dict.html#Context"
+ rel="Help"
+><strong>Context:</strong></a> directory, .htaccess<br>
+<a
+ href="directive-dict.html#Status"
+ rel="Help"
+><strong>Status:</strong></a> Base<br>
+<a
+ href="directive-dict.html#Module"
+ rel="Help"
+><strong>Module:</strong></a> mod_mime<br>
+<a
+ href="directive-dict.html#Compatibility"
+ rel="Help"
+><strong>Compatibility:</strong></a> RemoveInputFilter is only available in
+Apache 2.0.26 and later.<P>
+
+<P>
+The <samp>RemoveInputFilter</samp> directive removes any input filter
+associations for files with the given extensions. This allows
+<code>.htaccess</code> files in subdirectories to undo any associations
+inherited from parent directories or the server config files.</P>
+
+<p>The <em>extension</em> argument is case-insensitive, and can
+be specified with or without a leading dot.</p>
+
+<hr>
+
<h2><a name="removelanguage">RemoveLanguage</a> directive</h2>
<a
@@ -764,6 +884,42 @@ be specified with or without a leading dot.</p>
<hr>
+<h2><a name="removeoutputfilter">RemoveOutputFilter</a> directive</h2>
+
+<a
+ href="directive-dict.html#Syntax"
+ rel="Help"
+><strong>Syntax:</strong></a> RemoveOutputFilter <em>extension</em>
+ [<em>extension</em>] ...<br>
+<a
+ href="directive-dict.html#Context"
+ rel="Help"
+><strong>Context:</strong></a> directory, .htaccess<br>
+<a
+ href="directive-dict.html#Status"
+ rel="Help"
+><strong>Status:</strong></a> Base<br>
+<a
+ href="directive-dict.html#Module"
+ rel="Help"
+><strong>Module:</strong></a> mod_mime<br>
+<a
+ href="directive-dict.html#Compatibility"
+ rel="Help"
+><strong>Compatibility:</strong></a> RemoveOutputFilter is only available in
+Apache 2.0.26 and later.<P>
+
+<P>
+The <samp>RemoveOutputFilter</samp> directive removes any output filter
+associations for files with the given extensions. This allows
+<code>.htaccess</code> files in subdirectories to undo any associations
+inherited from parent directories or the server config files.</P>
+
+<p>The <em>extension</em> argument is case-insensitive, and can
+be specified with or without a leading dot.</p>
+
+<hr>
+
<h2><a name="removetype">RemoveType</a> directive</h2>
<a
@@ -815,52 +971,6 @@ be specified with or without a leading dot.</p>
<hr>
-<h2><a name="sethandler">SetHandler</a> directive</h2>
-
-<a
- href="directive-dict.html#Syntax"
- rel="Help"
-><strong>Syntax:</strong></a> SetHandler <em>handler-name</em><br>
-<a
- href="directive-dict.html#Context"
- rel="Help"
-><strong>Context:</strong></a> directory, .htaccess<br>
-<a
- href="directive-dict.html#Status"
- rel="Help"
-><strong>Status:</strong></a> Base<br>
-<a
- href="directive-dict.html#Module"
- rel="Help"
-><strong>Module:</strong></a> mod_mime<br>
-<a
- href="directive-dict.html#Compatibility"
- rel="Help"
-><strong>Compatibility:</strong></a> SetHandler is only available in Apache
-1.1 and later.<P>
-
-<P>When placed into an <code>.htaccess</code> file or a
-<code>&lt;Directory&gt;</code> or <code>&lt;Location&gt;</code> section,
-this directive forces all matching files to be parsed through the
-<a href="../handler.html">handler</a>
-given by <em>handler-name</em>. For example, if you had a
-directory you wanted to be parsed entirely as imagemap rule files,
-regardless of extension, you might put the following into an
-<code>.htaccess</code> file in that directory:
-<pre>
- SetHandler imap-file
-</pre>
-
-<P>Another example: if you wanted to have the server display a status
-report whenever a URL of <code>http://servername/status</code> was
-called, you might put the following into access.conf:
-<pre>
- &lt;Location /status&gt;
- SetHandler server-status
- &lt;/Location&gt;
-</pre>
-<hr>
-
<h2><a name="typesconfig">TypesConfig</a> directive</h2>
<a
href="directive-dict.html#Syntax"