mod_include.html revision beba8a1afeca7426582177044e78b63d936785a4
45e9809aff7304721fddb95654901b32195c9c7avboxsync<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
45e9809aff7304721fddb95654901b32195c9c7avboxsync "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
45e9809aff7304721fddb95654901b32195c9c7avboxsync <meta name="generator" content="HTML Tidy, see www.w3.org" />
45e9809aff7304721fddb95654901b32195c9c7avboxsync <!-- Background white, links blue (unvisited), navy (visited), red (active) -->
45e9809aff7304721fddb95654901b32195c9c7avboxsync <body bgcolor="#FFFFFF" text="#000000" link="#0000FF"
45e9809aff7304721fddb95654901b32195c9c7avboxsync <!--#include virtual="header.html" -->
45e9809aff7304721fddb95654901b32195c9c7avboxsync <p>This module provides for server-parsed html documents.</p>
45e9809aff7304721fddb95654901b32195c9c7avboxsync includes_module</p>
45e9809aff7304721fddb95654901b32195c9c7avboxsync <p>This module provides a filter which will process files
45e9809aff7304721fddb95654901b32195c9c7avboxsync before they are sent to the client. The processing is
45e9809aff7304721fddb95654901b32195c9c7avboxsync controlled by specially formated SGML comments, referred to as
45e9809aff7304721fddb95654901b32195c9c7avboxsync <em>elements</em>. These elements allow conditional text, the
45e9809aff7304721fddb95654901b32195c9c7avboxsync inclusion other files or programs, as well as the setting and
45e9809aff7304721fddb95654901b32195c9c7avboxsync printing of environment variables.</p>
45e9809aff7304721fddb95654901b32195c9c7avboxsync <p>See also: <a href="core.html#options">Options</a>, <a
45e9809aff7304721fddb95654901b32195c9c7avboxsync href="core.html.html#SetOutputFilter">SetOutputFilter</a>,
45e9809aff7304721fddb95654901b32195c9c7avboxsync and <a href="core.html#acceptpathinfo">AcceptPathInfo</a>.</p>
45e9809aff7304721fddb95654901b32195c9c7avboxsync <p>Server Side Includes are implemented by the
45e9809aff7304721fddb95654901b32195c9c7avboxsync <code>INCLUDES</code> <a href="/filter.html">filter</a>. If
45e9809aff7304721fddb95654901b32195c9c7avboxsync documents containing server-side include directives are given
45e9809aff7304721fddb95654901b32195c9c7avboxsync the extension .shtml, the following directives will make Apache
45e9809aff7304721fddb95654901b32195c9c7avboxsync parse them and assign the resulting document the mime type of
45e9809aff7304721fddb95654901b32195c9c7avboxsync <blockquote>
45e9809aff7304721fddb95654901b32195c9c7avboxsync AddOutputFilter INCLUDES .shtml</code>
45e9809aff7304721fddb95654901b32195c9c7avboxsync </blockquote>
45e9809aff7304721fddb95654901b32195c9c7avboxsync <p>The following directive must be given for the directories
45e9809aff7304721fddb95654901b32195c9c7avboxsync containing the shtml files (typically in a
45e9809aff7304721fddb95654901b32195c9c7avboxsync <code><Directory></code> section, but this directive is
45e9809aff7304721fddb95654901b32195c9c7avboxsync also valid .htaccess files if <code>AllowOverride
45e9809aff7304721fddb95654901b32195c9c7avboxsync <blockquote>
45e9809aff7304721fddb95654901b32195c9c7avboxsync </blockquote>
45e9809aff7304721fddb95654901b32195c9c7avboxsync <p>For backwards compatibility, the <code>server-parsed</code>
45e9809aff7304721fddb95654901b32195c9c7avboxsync <a href="/handler.html">handler</a> also activates the
45e9809aff7304721fddb95654901b32195c9c7avboxsync INCLUDES filter. As well, Apache will activate the INCLUDES
45e9809aff7304721fddb95654901b32195c9c7avboxsync filter for any document with mime type
45e9809aff7304721fddb95654901b32195c9c7avboxsync <code>text/x-server-parsed-html3</code> (and the resulting
45e9809aff7304721fddb95654901b32195c9c7avboxsync output will have the mime type <code>text/html</code>).</p>
45e9809aff7304721fddb95654901b32195c9c7avboxsync href="/howto/ssi.html">Tutorial on Server Side
45e9809aff7304721fddb95654901b32195c9c7avboxsync The document is parsed as an HTML document, with special
45e9809aff7304721fddb95654901b32195c9c7avboxsync commands embedded as SGML comments. A command has the syntax:
45e9809aff7304721fddb95654901b32195c9c7avboxsync <blockquote>
45e9809aff7304721fddb95654901b32195c9c7avboxsync </blockquote>
45e9809aff7304721fddb95654901b32195c9c7avboxsync The value will often be enclosed in double quotes; many
45e9809aff7304721fddb95654901b32195c9c7avboxsync commands only allow a single attribute-value pair. Note that
45e9809aff7304721fddb95654901b32195c9c7avboxsync the comment terminator (<samp>--></samp>) should be preceded
45e9809aff7304721fddb95654901b32195c9c7avboxsync by whitespace to ensure that it isn't considered part of an SSI
45e9809aff7304721fddb95654901b32195c9c7avboxsync This command controls various aspects of the parsing. The
45e9809aff7304721fddb95654901b32195c9c7avboxsync valid attributes are:
45e9809aff7304721fddb95654901b32195c9c7avboxsync <dd>The value is a message that is sent back to the
45e9809aff7304721fddb95654901b32195c9c7avboxsync client if an error occurs whilst parsing the
45e9809aff7304721fddb95654901b32195c9c7avboxsync document.</dd>
45e9809aff7304721fddb95654901b32195c9c7avboxsync <dd>The value sets the format to be used which displaying
45e9809aff7304721fddb95654901b32195c9c7avboxsync the size of a file. Valid values are <code>bytes</code>
45e9809aff7304721fddb95654901b32195c9c7avboxsync for a count in bytes, or <code>abbrev</code> for a count
45e9809aff7304721fddb95654901b32195c9c7avboxsync in Kb or Mb as appropriate.</dd>
45e9809aff7304721fddb95654901b32195c9c7avboxsync <dd>The value is a string to be used by the
45e9809aff7304721fddb95654901b32195c9c7avboxsync <code>strftime(3)</code> library routine when printing
45e9809aff7304721fddb95654901b32195c9c7avboxsync dates.</dd>