<directive module="mod_filter">FilterProvider</directive>.</p>
<p>One further directive <directive
-module="core">AddOutputFilterByType</directive> is still supported,
-but may be problematic and is now deprecated. Use dynamic
-configuration instead.</p>
+module="mod_filter">AddOutputFilterByType</directive> is still supported,
+but deprecated. Use dynamic configuration instead.</p>
</section>
</manualpage>
<seealso><directive module="mod_mime">AddCharset</directive></seealso>
</directivesynopsis>
-<directivesynopsis>
-<name>AddOutputFilterByType</name>
-<description>assigns an output filter to a particular media-type</description>
-<syntax>AddOutputFilterByType <var>filter</var>[;<var>filter</var>...]
-<var>media-type</var> [<var>media-type</var>] ...</syntax>
-<contextlist><context>server config</context>
-<context>virtual host</context><context>directory</context>
-<context>.htaccess</context></contextlist>
-<override>FileInfo</override>
-<compatibility>Available in Apache httpd 2.0.33 and later; deprecated in Apache httpd 2.1 and later</compatibility>
-
-<usage>
- <p>This directive activates a particular output <a
- href="../filter.html">filter</a> for a request depending on the
- response <glossary>media-type</glossary>. Because of certain
- problems discussed below, this directive is deprecated. The same
- functionality is available using <module>mod_filter</module>.</p>
-
- <p>The following example uses the <code>DEFLATE</code> filter, which
- is provided by <module>mod_deflate</module>. It will compress all
- output (either static or dynamic) which is labeled as
- <code>text/html</code> or <code>text/plain</code> before it is sent
- to the client.</p>
-
- <example>
- AddOutputFilterByType DEFLATE text/html text/plain
- </example>
-
- <p>If you want the content to be processed by more than one filter, their
- names have to be separated by semicolons. It's also possible to use one
- <directive>AddOutputFilterByType</directive> directive for each of
- these filters.</p>
-
- <p>The configuration below causes all script output labeled as
- <code>text/html</code> to be processed at first by the
- <code>INCLUDES</code> filter and then by the <code>DEFLATE</code>
- filter.</p>
-
- <example>
- <Location /cgi-bin/><br />
- <indent>
- Options Includes<br />
- AddOutputFilterByType INCLUDES;DEFLATE text/html<br />
- </indent>
- </Location>
- </example>
-
- <note type="warning"><title>Note</title>
- <p>Enabling filters with <directive>AddOutputFilterByType</directive>
- may fail partially or completely in some cases. For example, no
- filters are applied if the <glossary>media-type</glossary> could not
- be determined. If you want to make sure that the filters will be
- applied, assign the content type to a resource explicitly; for
- example, with <directive module="mod_mime">AddType</directive> or
- <directive module="core">ForceType</directive>. Setting the
- content type within a (non-nph) CGI script is also safe.</p>
-
- </note>
-</usage>
-
-<seealso><directive module="mod_mime">AddOutputFilter</directive></seealso>
-<seealso><directive module="core">SetOutputFilter</directive></seealso>
-<seealso><a href="../filter.html">filters</a></seealso>
-</directivesynopsis>
-
<directivesynopsis>
<name>AllowEncodedSlashes</name>
<description>Determines whether encoded path separators in URLs are allowed to
<directive module="core">SetInputFilter</directive>,
<directive module="core">SetOutputFilter</directive>,
<directive module="mod_mime">AddOutputFilter</directive> or
- <directive module="core">AddOutputFilterByType</directive> directives.</p>
+ <directive module="mod_filter">AddOutputFilterByType</directive> directives.</p>
<example><title>Using buffer with mod_include</title>
AddOutputFilterByType INCLUDES;BUFFER text/html<br />
will be ignored.</p>
<p>If you want to restrict the compression to particular MIME types
- in general, you may use the <directive module="core"
+ in general, you may use the <directive module="mod_filter"
>AddOutputFilterByType</directive> directive. Here is an example of
enabling compression only for the html files of the Apache
documentation:</p>
great deal of flexibility in configuring the filter chain. In fact,
filters can be inserted based on any Request Header, Response Header
or Environment Variable. This generalises the limited flexibility offered
- by <directive module="core">AddOutputFilterByType</directive>, and fixes
+ by <directive>AddOutputFilterByType</directive>, and fixes
it to work correctly with dynamic content, regardless of the
content generator. The ability to dispatch based on Environment
Variables offers the full flexibility of configuration with
<section id="examples"><title>Examples</title>
<dl>
<dt>Server side Includes (SSI)</dt>
- <dd>A simple case of using <module>mod_filter</module> in place of
- <directive module="core">AddOutputFilterByType</directive>
+ <dd>A simple case of replacing <directive>AddOutputFilterByType</directive>
<example>
FilterDeclare SSI<br/>
FilterProvider SSI INCLUDES "$resp{Content-Type} = /^text\/html/"<br/>
Modules using it should test it carefully.</p>
</section>
+<directivesynopsis>
+<name>AddOutputFilterByType</name>
+<description>assigns an output filter to a particular media-type</description>
+<syntax>AddOutputFilterByType <var>filter</var>[;<var>filter</var>...]
+<var>media-type</var> [<var>media-type</var>] ...</syntax>
+<contextlist><context>server config</context>
+<context>virtual host</context><context>directory</context>
+<context>.htaccess</context></contextlist>
+<override>FileInfo</override>
+<compatibility>Available in Apache httpd 2.0.33 and later; deprecated in Apache httpd 2.1 and later</compatibility>
+
+<usage>
+ <p>This directive activates a particular output <a
+ href="../filter.html">filter</a> for a request depending on the
+ response <glossary>media-type</glossary>. Because of certain
+ problems discussed below, this directive is deprecated. The same
+ functionality is available using <module>mod_filter</module>.</p>
+
+ <p>The following example uses the <code>DEFLATE</code> filter, which
+ is provided by <module>mod_deflate</module>. It will compress all
+ output (either static or dynamic) which is labeled as
+ <code>text/html</code> or <code>text/plain</code> before it is sent
+ to the client.</p>
+
+ <example>
+ AddOutputFilterByType DEFLATE text/html text/plain
+ </example>
+
+ <p>If you want the content to be processed by more than one filter, their
+ names have to be separated by semicolons. It's also possible to use one
+ <directive>AddOutputFilterByType</directive> directive for each of
+ these filters.</p>
+
+ <p>The configuration below causes all script output labeled as
+ <code>text/html</code> to be processed at first by the
+ <code>INCLUDES</code> filter and then by the <code>DEFLATE</code>
+ filter.</p>
+
+ <example>
+ <Location /cgi-bin/><br />
+ <indent>
+ Options Includes<br />
+ AddOutputFilterByType INCLUDES;DEFLATE text/html<br />
+ </indent>
+ </Location>
+ </example>
+
+ <note type="warning"><title>Note</title>
+ <p>Enabling filters with <directive>AddOutputFilterByType</directive>
+ may fail partially or completely in some cases. For example, no
+ filters are applied if the <glossary>media-type</glossary> could not
+ be determined. If you want to make sure that the filters will be
+ applied, assign the content type to a resource explicitly; for
+ example, with <directive module="mod_mime">AddType</directive> or
+ <directive module="core">ForceType</directive>. Setting the
+ content type within a (non-nph) CGI script is also safe.</p>
+
+ </note>
+</usage>
+
+<seealso><directive module="mod_mime">AddOutputFilter</directive></seealso>
+<seealso><directive module="core">SetOutputFilter</directive></seealso>
+<seealso><a href="../filter.html">filters</a></seealso>
+</directivesynopsis>
+
<directivesynopsis>
<name>FilterDeclare</name>
<description>Declare a smart filter</description>
href="../filter.html">filters</a> which will process responses
from the server before they are sent to the client. This is in
addition to any filters defined elsewhere, including <directive
- module="core">SetOutputFilter</directive> and <directive module="core"
+ module="core">SetOutputFilter</directive> and <directive module="mod_filter"
>AddOutputFilterByType</directive> directive. This mapping is merged
over any already in force, overriding any mappings that already exist
for the same <var>extension</var>.</p>