mod_include.html.en revision 4d1373ab409b4f731e42113cb1137ae3fdedeb4a
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd This file is generated from xml source: DO NOT EDIT
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd<link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd<link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd<link href="/style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd<link href="/images/favicon.ico" rel="shortcut icon" /></head>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.html">Directives</a> | <a href="/faq/">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd<div class="up"><a href="./"><img title="<-" alt="<-" src="/images/left.gif" /></a></div>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs-project/">Documentation</a> > <a href="../">Version 2.1</a> > <a href="./">Modules</a></div>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd<p><span>Available Languages: </span><a href="/en/mod/mod_include.html" title="English"> en </a> |
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd<a href="/ja/mod/mod_include.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a></p>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd<table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Server-parsed html documents (Server Side Includes)</td></tr>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd<tr><th><a href="module-dict.html#Status">Status:</a></th><td>Base</td></tr>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd<tr><th><a href="module-dict.html#ModuleIdentifier">Module�Identifier:</a></th><td>include_module</td></tr>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd<tr><th><a href="module-dict.html#SourceFile">Source�File:</a></th><td>mod_include.c</td></tr>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd<tr><th><a href="module-dict.html#Compatibility">Compatibility:</a></th><td>Implemented as an output filter since Apache
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <p>This module provides a filter which will process files
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd before they are sent to the client. The processing is
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd controlled by specially formatted SGML comments, referred to as
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <dfn>elements</dfn>. These elements allow conditional text, the
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd inclusion of other files or programs, as well as the setting and
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd printing of environment variables.</p>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd<div id="quickview"><h3 class="directives">Directives</h3>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd<li><img alt="" src="/images/down.gif" /> <a href="#ssiendtag">SSIEndTag</a></li>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd<li><img alt="" src="/images/down.gif" /> <a href="#ssierrormsg">SSIErrorMsg</a></li>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd<li><img alt="" src="/images/down.gif" /> <a href="#ssistarttag">SSIStartTag</a></li>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd<li><img alt="" src="/images/down.gif" /> <a href="#ssitimeformat">SSITimeFormat</a></li>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd<li><img alt="" src="/images/down.gif" /> <a href="#ssiundefinedecho">SSIUndefinedEcho</a></li>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd<li><img alt="" src="/images/down.gif" /> <a href="#xbithack">XBitHack</a></li>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd<li><img alt="" src="/images/down.gif" /> <a href="#enabling">Enabling Server-Side Includes</a></li>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd<li><img alt="" src="/images/down.gif" /> <a href="#pathinfo">PATH_INFO with Server Side Includes</a></li>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd<li><img alt="" src="/images/down.gif" /> <a href="#elements">Basic Elements</a></li>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd<li><img alt="" src="/images/down.gif" /> <a href="#includevars">Include Variables</a></li>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd<li><img alt="" src="/images/down.gif" /> <a href="#substitution">Variable Substitution</a></li>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd<li><img alt="" src="/images/down.gif" /> <a href="#flowctrl">Flow Control Elements</a></li>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd<li><code class="directive"><a href="/mod/core.html#options">Options</a></code></li>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd<li><code class="directive"><a href="/mod/core.html#acceptpathinfo">AcceptPathInfo</a></code></li>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd<h2><a name="enabling" id="enabling">Enabling Server-Side Includes</a></h2>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <p>Server Side Includes are implemented by the
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <code>INCLUDES</code> <a href="/filter.html">filter</a>. If
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd documents containing server-side include directives are given
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd the extension .shtml, the following directives will make Apache
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd parse them and assign the resulting document the mime type of
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd AddOutputFilter INCLUDES .shtml
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <p>The following directive must be given for the directories
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd containing the shtml files (typically in a
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <code class="directive"><a href="/mod/core.html#directory"><Directory></a></code> section,
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd but this directive is also valid in <code>.htaccess</code> files if
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd <code class="directive"><a href="/mod/core.html#allowoverride">AllowOverride</a></code> <code>Options</code>
6116c12fdd3ed06d388fe6572e50a22e9320dfa5nd is set):</p>
<p>For more information, see our <a href="/howto/ssi.html">Tutorial on Server Side Includes</a>.</p>
by default. You can use the <code class="directive"><a href="/mod/core.html#acceptpathinfo">AcceptPathInfo</a></code> directive to
<code class="module"><a href="/mod/mod_include.html">mod_include</a></code>. In fact, the <code><a href="#element.exec">exec</a></code> element is provided by
<code class="module"><a href="/mod/mod_cgi.html">mod_cgi</a></code>, and will only be available if this
attempts to echo an undefined variable. This overrides any <code class="directive"><a href="#ssiundefinedecho">SSIUndefinedEcho</a></code> directives.</dd>
document. This overrides any <code class="directive"><a href="#ssierrormsg">SSIErrorMsg</a></code> directives.</dd>
determined by the <code class="directive"><a href="#ssiundefinedecho">SSIUndefinedEcho</a></code> directive. Any dates printed are
CGI script. It requires <code class="module"><a href="/mod/mod_cgi.html">mod_cgi</a></code> to be present
<code>/bin/sh</code>. The <a href="#includevars">include variables</a> are available to the command, in addition
<p>The use of <code><a href="#includevirtual">#include virtual</a></code> is almost always prefered to using
their values. Special characters are entity encoded (see the <code><a href="#element.echo">echo</a></code> element for details)
<div class="example"><p><code><var>string1</var> <var>string2</var></code> results in <code><var>string1</var> <var>string2</var></code><br />
<code>'<var>string1</var> <var>string2</var>'</code> results in <code><var>string1</var> <var>string2</var></code>.</p></div>
above that means, <code class="module"><a href="/mod/mod_include.html">mod_include</a></code> evaluates at first
<div class="directive-section"><h2><a name="SSIEndTag" id="SSIEndTag">SSIEndTag</a> <a name="ssiendtag" id="ssiendtag">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>String that ends an include element</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSIEndTag <var>tag</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSIEndTag "-->"</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in version 2.0.30 and later.</td></tr>
<p>This directive changes the string that <code class="module"><a href="/mod/mod_include.html">mod_include</a></code>
<div class="directive-section"><h2><a name="SSIErrorMsg" id="SSIErrorMsg">SSIErrorMsg</a> <a name="ssierrormsg" id="ssierrormsg">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Error message displayed when there is an SSI
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSIErrorMsg <var>message</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSIErrorMsg "[an error occurred while processing this
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in version 2.0.30 and later.</td></tr>
message displayed when <code class="module"><a href="/mod/mod_include.html">mod_include</a></code> encounters an
<div class="directive-section"><h2><a name="SSIStartTag" id="SSIStartTag">SSIStartTag</a> <a name="ssistarttag" id="ssistarttag">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>String that starts an include element</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSIStartTag <var>tag</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSIStartTag "<!--#"</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in version 2.0.30 and later.</td></tr>
<p>This directive changes the string that <code class="module"><a href="/mod/mod_include.html">mod_include</a></code>
<div class="directive-section"><h2><a name="SSITimeFormat" id="SSITimeFormat">SSITimeFormat</a> <a name="ssitimeformat" id="ssitimeformat">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures the format in which date strings are
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSITimeFormat <var>formatstring</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSITimeFormat "%A, %d-%b-%Y %H:%M:%S %Z"</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in version 2.0.30 and later.</td></tr>
<div class="directive-section"><h2><a name="SSIUndefinedEcho" id="SSIUndefinedEcho">SSIUndefinedEcho</a> <a name="ssiundefinedecho" id="ssiundefinedecho">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>String displayed when an unset variable is echoed</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSIUndefinedEcho <var>string</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSIUndefinedEcho "(none)"</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in version 2.0.34 and later.</td></tr>
<p>This directive changes the string that <code class="module"><a href="/mod/mod_include.html">mod_include</a></code>
<div class="directive-section"><h2><a name="XBitHack" id="XBitHack">XBitHack</a> <a name="xbithack" id="xbithack">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Parse SSI directives in files with the execute bit
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>XBitHack on|off|full</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>XBitHack off</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
with the MIME type <code>text/html</code>. <code class="directive">XBitHack</code> can take on the following values:</p>
group-execute bit is unset for every SSI script which might <code>#include</code> a CGI or otherwise produces different output on
<p><span>Available Languages: </span><a href="/en/mod/mod_include.html" title="English"> en </a> |
<a href="/ja/mod/mod_include.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a></p>
<p class="apache">Maintained by the <a href="http://httpd.apache.org/docs-project/">Apache HTTP Server Documentation Project</a></p>
<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.html">Directives</a> | <a href="/faq/">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p></div>