<!--#include virtual="header.html" -->
<H1 ALIGN="CENTER">Apache Server Frequently Asked Questions</H1>
<P>
- $Revision: 1.7 $ ($Date: 2000/12/02 21:39:03 $)
+ $Revision: 1.8 $ ($Date: 2001/02/10 23:33:36 $)
</P>
<P>
The latest version of this FAQ is always available from the main
directive which permits <SAMP>Includes</SAMP>.
</LI>
<LI>Make sure that the directory where you want the SSI documents to
- live is covered by the "server-parsed" content handler,
+ live is covered by the "INCLUDES" output filter,
either explicitly or in some ancestral location. That can be done
with the following
- <A HREF="../mod/mod_mime.html#addhandler"><SAMP>AddHandler</SAMP></A>
+ <A HREF="../mod/core.html#setoutputfilter"><SAMP>SetOutputFilter</SAMP></A>
directive:
<P>
- <DL>
- <DD><CODE>AddHandler server-parsed .shtml</CODE>
- </DD>
- </DL>
+ <blockquote><code>
+ <FilesMatch "\.shtml[.$]"><br>
+ SetOutputFilter INCLUDES<br>
+ </FilesMatch>
+ </code></blockquote>
<P></P>
<P>
- This indicates that all files ending in ".shtml" in that
- location (or its descendants) should be parsed. Note that using
- ".html" will cause all normal HTML files to be parsed,
- which may put an inordinate load on your server.
+ This indicates that all files with the extension
+ ".shtml" in that location (or its descendants) should be
+ parsed. Note that using ".html" will cause all normal
+ HTML files to be parsed, which may put an inordinate load on your
+ server.
</P>
</LI>
</UL>
<H2>Enabling Server-Side Includes</H2>
-Any document with handler of "server-parsed" will be parsed by this
-module, if the <CODE>Includes</CODE> option is set. If documents
-containing server-side include directives are given the extension
-.shtml, the following directives will make Apache parse them and
-assign the resulting document the mime type of <CODE>text/html</CODE>:
-
-<PRE>
-AddType text/html .shtml
-AddHandler server-parsed .shtml
-</PRE>
-
-The following directive must be given for the directories containing
+<p>Server Side Includes are implemented by the <code>INCLUDES</code>
+<a href="../filter.html">filter</a>. If documents containing
+server-side include directives are given the extension .shtml, the
+following directives will make Apache parse them and assign the
+resulting document the mime type of <CODE>text/html</CODE>:
+</p>
+
+<blockquote><code>
+AddType text/html .shtml<br>
+<FilesMatch "\.shtml[.$]"><br>
+ SetOutputFilter INCLUDES<br>
+</FilesMatch>
+</code></blockquote>
+
+<p>The following directive must be given for the directories containing
the shtml files (typically in a <CODE><Directory></CODE> section,
but this directive is also valid .htaccess files if <CODE>AllowOverride
-Options</CODE> is set):
+Options</CODE> is set):</p>
-<PRE>
+<blockquote><code>
Options +Includes
-</PRE>
+</code></blockquote>
-Alternatively the <A HREF="#xbithack"><CODE>XBitHack</CODE></A>
+<p>Alternatively the <A HREF="#xbithack"><CODE>XBitHack</CODE></A>
directive can be used to parse normal (<CODE>text/html</CODE>) files,
-based on file permissions. <P>
+based on file permissions.</p>
-For backwards compatibility, documents with mime type
+<p>For backwards compatibility, documents with mime type
<CODE>text/x-server-parsed-html</CODE> or
<CODE>text/x-server-parsed-html3</CODE> will also be parsed
-(and the resulting output given the mime type <CODE>text/html</CODE>).
+(and the resulting output given the mime type <CODE>text/html</CODE>)
+as will documents with the handler <code>server-parsed</code>.
<H2>Basic Elements</H2>