97a9a944b5887e91042b019776c41d5dd74557aferikabele<?xml version="1.0" encoding="ISO-8859-1"?>
97a9a944b5887e91042b019776c41d5dd74557aferikabele<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd<!--
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive This file is generated from xml source: DO NOT EDIT
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
b686b6a420bde7f78c416b90be11db94cb789979nd -->
96ad5d81ee4a2cc66a4ae19893efc8aa6d06fae7jailletc<title>mod_include - Apache HTTP Server Version 2.5</title>
b686b6a420bde7f78c416b90be11db94cb789979nd<link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
b686b6a420bde7f78c416b90be11db94cb789979nd<link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen<link href="/style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="/style/css/prettify.css" />
2e545ce2450a9953665f701bb05350f0d3f26275nd<script src="/style/scripts/prettify.min.js" type="text/javascript">
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen</script>
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen
b686b6a420bde7f78c416b90be11db94cb789979nd<link href="/images/favicon.ico" rel="shortcut icon" /></head>
b686b6a420bde7f78c416b90be11db94cb789979nd<body>
b686b6a420bde7f78c416b90be11db94cb789979nd<div id="page-header">
af33a4994ae2ff15bc67d19ff1a7feb906745bf8rbowen<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/quickreference.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p>
3f08db06526d6901aa08c110b5bc7dde6bc39905nd<p class="apache">Apache HTTP Server Version 2.5</p>
b686b6a420bde7f78c416b90be11db94cb789979nd<img alt="" src="/images/feather.gif" /></div>
b686b6a420bde7f78c416b90be11db94cb789979nd<div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="/images/left.gif" /></a></div>
b686b6a420bde7f78c416b90be11db94cb789979nd<div id="path">
3f08db06526d6901aa08c110b5bc7dde6bc39905nd<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.5</a> &gt; <a href="./">Modules</a></div>
b686b6a420bde7f78c416b90be11db94cb789979nd<div id="page-content">
b686b6a420bde7f78c416b90be11db94cb789979nd<div id="preamble"><h1>Apache Module mod_include</h1>
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd<div class="toplang">
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd<p><span>Available Languages: </span><a href="/en/mod/mod_include.html" title="English">&nbsp;en&nbsp;</a> |
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjung<a href="/ja/mod/mod_include.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a></p>
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd</div>
b686b6a420bde7f78c416b90be11db94cb789979nd<table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Server-parsed html documents (Server Side Includes)</td></tr>
b686b6a420bde7f78c416b90be11db94cb789979nd<tr><th><a href="module-dict.html#Status">Status:</a></th><td>Base</td></tr>
b686b6a420bde7f78c416b90be11db94cb789979nd<tr><th><a href="module-dict.html#ModuleIdentifier">Module�Identifier:</a></th><td>include_module</td></tr>
b09fcdfc59ada4712150e7bcc7b502bb9e4601d8rjung<tr><th><a href="module-dict.html#SourceFile">Source�File:</a></th><td>mod_include.c</td></tr></table>
b686b6a420bde7f78c416b90be11db94cb789979nd<h3>Summary</h3>
b686b6a420bde7f78c416b90be11db94cb789979nd
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>This module provides a filter which will process files
06ba4a61654b3763ad65f52283832ebf058fdf1cslive before they are sent to the client. The processing is
491856cfdee8ce7c5eb4d4886784713bebad2e80nd controlled by specially formatted SGML comments, referred to as
491856cfdee8ce7c5eb4d4886784713bebad2e80nd <dfn>elements</dfn>. These elements allow conditional text, the
06ba4a61654b3763ad65f52283832ebf058fdf1cslive inclusion of other files or programs, as well as the setting and
06ba4a61654b3763ad65f52283832ebf058fdf1cslive printing of environment variables.</p>
b686b6a420bde7f78c416b90be11db94cb789979nd</div>
c44eeebd065e2c8cd028016b45c58afb480aaf8fdruggeri<div id="quickview"><h3>Topics</h3>
c44eeebd065e2c8cd028016b45c58afb480aaf8fdruggeri<ul id="topics">
c44eeebd065e2c8cd028016b45c58afb480aaf8fdruggeri<li><img alt="" src="/images/down.gif" /> <a href="#enabling">Enabling Server-Side Includes</a></li>
c44eeebd065e2c8cd028016b45c58afb480aaf8fdruggeri<li><img alt="" src="/images/down.gif" /> <a href="#pathinfo">PATH_INFO with Server Side Includes</a></li>
c44eeebd065e2c8cd028016b45c58afb480aaf8fdruggeri<li><img alt="" src="/images/down.gif" /> <a href="#elements">Available Elements</a></li>
c44eeebd065e2c8cd028016b45c58afb480aaf8fdruggeri<li><img alt="" src="/images/down.gif" /> <a href="#includevars">Include Variables</a></li>
c44eeebd065e2c8cd028016b45c58afb480aaf8fdruggeri<li><img alt="" src="/images/down.gif" /> <a href="#substitution">Variable Substitution</a></li>
c44eeebd065e2c8cd028016b45c58afb480aaf8fdruggeri<li><img alt="" src="/images/down.gif" /> <a href="#flowctrl">Flow Control Elements</a></li>
c44eeebd065e2c8cd028016b45c58afb480aaf8fdruggeri<li><img alt="" src="/images/down.gif" /> <a href="#legacyexpr">Legacy expression syntax</a></li>
c44eeebd065e2c8cd028016b45c58afb480aaf8fdruggeri</ul><h3 class="directives">Directives</h3>
b686b6a420bde7f78c416b90be11db94cb789979nd<ul id="toc">
b686b6a420bde7f78c416b90be11db94cb789979nd<li><img alt="" src="/images/down.gif" /> <a href="#ssiendtag">SSIEndTag</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#ssierrormsg">SSIErrorMsg</a></li>
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin<li><img alt="" src="/images/down.gif" /> <a href="#ssietag">SSIETag</a></li>
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin<li><img alt="" src="/images/down.gif" /> <a href="#ssilastmodified">SSILastModified</a></li>
fcd7f1f7d11d39b8379972a455e1c7e67a5dfa9dsf<li><img alt="" src="/images/down.gif" /> <a href="#ssilegacyexprparser">SSILegacyExprParser</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#ssistarttag">SSIStartTag</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#ssitimeformat">SSITimeFormat</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#ssiundefinedecho">SSIUndefinedEcho</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#xbithack">XBitHack</a></li>
b686b6a420bde7f78c416b90be11db94cb789979nd</ul>
c44eeebd065e2c8cd028016b45c58afb480aaf8fdruggeri<h3>See also</h3>
b686b6a420bde7f78c416b90be11db94cb789979nd<ul class="seealso">
b686b6a420bde7f78c416b90be11db94cb789979nd<li><code class="directive"><a href="/mod/core.html#options">Options</a></code></li>
b686b6a420bde7f78c416b90be11db94cb789979nd<li><code class="directive"><a href="/mod/core.html#acceptpathinfo">AcceptPathInfo</a></code></li>
b686b6a420bde7f78c416b90be11db94cb789979nd<li><a href="/filter.html">Filters</a></li>
b686b6a420bde7f78c416b90be11db94cb789979nd<li><a href="/howto/ssi.html">SSI Tutorial</a></li>
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedooh</ul><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div>
b686b6a420bde7f78c416b90be11db94cb789979nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<div class="section">
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<h2><a name="enabling" id="enabling">Enabling Server-Side Includes</a></h2>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
06ba4a61654b3763ad65f52283832ebf058fdf1cslive
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>Server Side Includes are implemented by the
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code>INCLUDES</code> <a href="/filter.html">filter</a>. If
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar documents containing server-side include directives are given
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar the extension .shtml, the following directives will make Apache
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar parse them and assign the resulting document the mime type of
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code>text/html</code>:</p>
2d24960fa1e6afc7ad5f1bf58b6b3f5e7a9a3497humbedooh
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <pre class="prettyprint lang-config">AddType text/html .shtml
1f1b6bf13313fdd14a45e52e553d3ff28689b717coarAddOutputFilter INCLUDES .shtml</pre>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive
06ba4a61654b3763ad65f52283832ebf058fdf1cslive
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>The following directive must be given for the directories
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar containing the shtml files (typically in a
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code class="directive"><a href="/mod/core.html#directory">&lt;Directory&gt;</a></code> section,
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar but this directive is also valid in <code>.htaccess</code> files if
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code class="directive"><a href="/mod/core.html#allowoverride">AllowOverride</a></code> <code>Options</code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar is set):</p>
2d24960fa1e6afc7ad5f1bf58b6b3f5e7a9a3497humbedooh
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <pre class="prettyprint lang-config">Options +Includes</pre>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive
06ba4a61654b3763ad65f52283832ebf058fdf1cslive
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>For backwards compatibility, the <code>server-parsed</code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <a href="/handler.html">handler</a> also activates the
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar INCLUDES filter. As well, Apache will activate the INCLUDES
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar filter for any document with mime type
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code>text/x-server-parsed-html</code> or
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code>text/x-server-parsed-html3</code> (and the resulting
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar output will have the mime type <code>text/html</code>).</p>
491856cfdee8ce7c5eb4d4886784713bebad2e80nd
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>For more information, see our <a href="/howto/ssi.html">Tutorial on Server Side Includes</a>.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar</div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<div class="section">
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<h2><a name="pathinfo" id="pathinfo">PATH_INFO with Server Side Includes</a></h2>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
06ba4a61654b3763ad65f52283832ebf058fdf1cslive
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>Files processed for server-side includes no longer accept
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar requests with <code>PATH_INFO</code> (trailing pathname information)
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar by default. You can use the <code class="directive"><a href="/mod/core.html#acceptpathinfo">AcceptPathInfo</a></code> directive to
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar configure the server to accept requests with <code>PATH_INFO</code>.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar</div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<div class="section">
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<h2><a name="elements" id="elements">Available Elements</a></h2>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>The document is parsed as an HTML document, with special
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar commands embedded as SGML comments. A command has the syntax: </p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <div class="example"><p><code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar &lt;!--#<var>element</var> <var>attribute</var>=<var>value</var>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <var>attribute</var>=<var>value</var> ... --&gt;
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </code></p></div>
4d1373ab409b4f731e42113cb1137ae3fdedeb4and
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>The value will often be enclosed in double quotes, but single
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar quotes (<code>'</code>) and backticks (<code>`</code>) are also
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar possible. Many commands only allow a single attribute-value pair.
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar Note that the comment terminator (<code>--&gt;</code>) should be
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar preceded by whitespace to ensure that it isn't considered part of
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar an SSI token. Note that the leading <code>&lt;!--#</code> is <em>one</em>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar token and may not contain any whitespaces.</p>
491856cfdee8ce7c5eb4d4886784713bebad2e80nd
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>The allowed elements are listed in the following table:</p>
491856cfdee8ce7c5eb4d4886784713bebad2e80nd
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <table class="bordered">
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <tr><th>Element</th><th>Description</th></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <tr><td><code><a href="#element.config">config</a></code></td>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <td>configure output formats</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <tr><td><code><a href="#element.echo">echo</a></code></td>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <td>print variables</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <tr><td><code><a href="#element.exec">exec</a></code></td>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <td>execute external programs</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <tr><td><code><a href="#element.fsize">fsize</a></code></td>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <td>print size of a file</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <tr><td><code><a href="#element.flastmod">flastmod</a></code></td>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <td>print last modification time of a file</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <tr><td><code><a href="#element.include">include</a></code></td>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <td>include a file</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <tr><td><code><a href="#element.printenv">printenv</a></code></td>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <td>print all available variables</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <tr><td><code><a href="#element.set">set</a></code></td>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <td>set a value of a variable</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </table>
491856cfdee8ce7c5eb4d4886784713bebad2e80nd
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>SSI elements may be defined by modules other than
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <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
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code class="module"><a href="/mod/mod_cgi.html">mod_cgi</a></code>, and will only be available if this
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar module is loaded.</p>
491856cfdee8ce7c5eb4d4886784713bebad2e80nd
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <h3><a name="element.config" id="element.config">The config Element</a></h3>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>This command controls various aspects of the parsing. The
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar valid attributes are:</p>
0254a9ce455c7ddaa83bafab9d7f92be25d07b24rbowen
564ee5b847469eb8a61120179ce70a0213965785rbowen <dl>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dt><code>echomsg</code> (<em>Apache 2.1 and later</em>)</dt>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dd><p>The value is a message that is sent back to the
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar client if the <code><a href="#element.echo">echo</a></code> element
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar attempts to echo an undefined variable. This overrides any <code class="directive"><a href="#ssiundefinedecho">SSIUndefinedEcho</a></code> directives.</p>
96d5b576da411c920e34160c63d09cbe9c8a516and
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <div class="example"><p><code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar &lt;!--#config echomsg="[Value Undefined]" --&gt;
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </code></p></div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </dd>
491856cfdee8ce7c5eb4d4886784713bebad2e80nd
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dt><code>errmsg</code></dt>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dd><p>The value is a message that is sent back to the
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar client if an error occurs while parsing the
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar document. This overrides any <code class="directive"><a href="#ssierrormsg">SSIErrorMsg</a></code> directives.</p>
a99c5d4cc3cab6a62b04d52000dbc22ce1fa2d94coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <div class="example"><p><code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar &lt;!--#config errmsg="[Oops, something broke.]" --&gt;
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </code></p></div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </dd>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dt><code>sizefmt</code></dt>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dd><p>The value sets the format to be used when displaying
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar the size of a file. Valid values are <code>bytes</code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar for a count in bytes, or <code>abbrev</code> for a count
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar in Kb or Mb as appropriate, for example a size of 1024 bytes
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar will be printed as "1K".</p>
a99c5d4cc3cab6a62b04d52000dbc22ce1fa2d94coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <div class="example"><p><code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar &lt;!--#config sizefmt="abbrev" --&gt;
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </code></p></div>
a99c5d4cc3cab6a62b04d52000dbc22ce1fa2d94coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </dd>
491856cfdee8ce7c5eb4d4886784713bebad2e80nd
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dt><code>timefmt</code></dt>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dd><p>The value is a string to be used by the
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code>strftime(3)</code> library routine when printing
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar dates.</p>
a99c5d4cc3cab6a62b04d52000dbc22ce1fa2d94coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <div class="example"><p><code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar &lt;!--#config timefmt=""%R, %B %d, %Y"" --&gt;
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </code></p></div>
a99c5d4cc3cab6a62b04d52000dbc22ce1fa2d94coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </dd>
491856cfdee8ce7c5eb4d4886784713bebad2e80nd </dl>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
491856cfdee8ce7c5eb4d4886784713bebad2e80nd
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <h3><a name="element.echo" id="element.echo">The echo Element</a></h3>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>This command prints one of the <a href="#includevars">include
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar variables</a> defined below. If the variable is unset, the result is
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar determined by the <code class="directive"><a href="#ssiundefinedecho">SSIUndefinedEcho</a></code> directive. Any dates printed are
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar subject to the currently configured <code>timefmt</code>.</p>
491856cfdee8ce7c5eb4d4886784713bebad2e80nd
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>Attributes:</p>
491856cfdee8ce7c5eb4d4886784713bebad2e80nd
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dl>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dt><code>var</code></dt>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dd>The value is the name of the variable to print.</dd>
491856cfdee8ce7c5eb4d4886784713bebad2e80nd
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dt><code>decoding</code></dt>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dd><p>Specifies whether Apache should strip an encoding from
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar the variable before processing the variable further. The default
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar is <code>none</code>, where no decoding will be done. If set to
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code>url</code>, then URL decoding (also known as %-encoding;
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar this is appropriate for use within URLs in links, etc.) will be
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar performed. If set to <code>urlencoded</code>,
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar application/x-www-form-urlencoded compatible encoding (found in
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar query strings) will be stripped. If set to <code>base64</code>,
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar base64 will be decoded, and if set to <code>entity</code>, HTML
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar entity encoding will be stripped. Decoding is done prior to any
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar further encoding on the variable. Multiple encodings can be
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar stripped by specifying more than one comma separated encoding.
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar The decoding setting will remain in effect until the next decoding
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar attribute is encountered, or the element ends.</p>
3aba088758372149968c0fd7e5a76df50caee1ecrbowen
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>The <code>decoding</code> attribute must <em>precede</em> the
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar corresponding <code>var</code> attribute to be effective.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </dd>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dt><code>encoding</code></dt>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dd><p>Specifies how Apache should encode special characters
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar contained in the variable before outputting them. If set
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar to <code>none</code>, no encoding will be done. If set to
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code>url</code>, then URL encoding (also known as %-encoding;
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar this is appropriate for use within URLs in links, etc.) will be
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar performed. If set to <code>urlencoded</code>,
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar application/x-www-form-urlencoded compatible encoding will be
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar performed instead, and should be used with query strings. If set
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar to <code>base64</code>, base64 encoding will be performed. At
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar the start of an <code>echo</code> element, the default is set to
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code>entity</code>, resulting in entity encoding (which is
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar appropriate in the context of a block-level HTML element,
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <em>e.g.</em> a paragraph of text). This can be changed by adding
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar an <code>encoding</code> attribute, which will remain in effect
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar until the next <code>encoding</code> attribute is encountered or
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar the element ends, whichever comes first.</p>
491856cfdee8ce7c5eb4d4886784713bebad2e80nd
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>The <code>encoding</code> attribute must <em>precede</em> the
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar corresponding <code>var</code> attribute to be effective.</p>
491856cfdee8ce7c5eb4d4886784713bebad2e80nd
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <div class="warning">
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar In order to avoid cross-site scripting issues, you should
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <em>always</em> encode user supplied data.
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </div>
491856cfdee8ce7c5eb4d4886784713bebad2e80nd
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <div class="example"><h3>Example</h3><p><code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar &lt;!--#echo encoding="entity" var="QUERY_STRING" --&gt;
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </code></p></div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </dd>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </dl>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
06ba4a61654b3763ad65f52283832ebf058fdf1cslive
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <h3><a name="element.exec" id="element.exec">The exec Element</a></h3>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>The <code>exec</code> command executes a given shell command or
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar CGI script. It requires <code class="module"><a href="/mod/mod_cgi.html">mod_cgi</a></code> to be present
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar in the server. If <code class="directive"><a href="/mod/core.html#options">Options</a></code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code>IncludesNOEXEC</code> is set, this command is completely
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar disabled. The valid attributes are:</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dl>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dt><code>cgi</code></dt>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dd><p>The value specifies a (%-encoded) URL-path to
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar the CGI script. If the path does not begin with a slash (/),
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar then it is taken to be relative to the current
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar document. The document referenced by this path is
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar invoked as a CGI script, even if the server would not
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar normally recognize it as such. However, the directory
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar containing the script must be enabled for CGI scripts
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar (with <code class="directive"><a href="/mod/mod_alias.html#scriptalias">ScriptAlias</a></code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar or <code class="directive"><a href="/mod/core.html#options">Options</a></code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code>ExecCGI</code>).</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>The CGI script is given the <code>PATH_INFO</code> and query
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar string (<code>QUERY_STRING</code>) of the original request from the
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar client; these <em>cannot</em> be specified in the URL path. The
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar include variables will be available to the script in addition to
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar the standard <a href="mod_cgi.html">CGI</a> environment.</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <div class="example"><h3>Example</h3><p><code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar &lt;!--#exec cgi="/cgi-bin/example.cgi" --&gt;
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </code></p></div>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>If the script returns a <code>Location:</code> header instead of
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar output, then this will be translated into an HTML anchor.</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>The <code><a href="#includevirtual">include virtual</a></code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar element should be used in preference to <code>exec cgi</code>. In
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar particular, if you need to pass additional arguments to a CGI program,
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar using the query string, this cannot be done with <code>exec
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar cgi</code>, but can be done with <code>include virtual</code>, as
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar shown here:</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <div class="example"><p><code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar &lt;!--#include virtual="/cgi-bin/example.cgi?argument=value" --&gt;
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </code></p></div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </dd>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dt><code>cmd</code></dt>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dd><p>The server will execute the given string using
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code>/bin/sh</code>. The <a href="#includevars">include variables</a> are available to the command, in addition
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar to the usual set of CGI variables.</p>
491856cfdee8ce7c5eb4d4886784713bebad2e80nd
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>The use of <code><a href="#includevirtual">#include virtual</a></code> is almost always prefered to using
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar either <code>#exec cgi</code> or <code>#exec cmd</code>. The former
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar (<code>#include virtual</code>) uses the standard Apache sub-request
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar mechanism to include files or scripts. It is much better tested and
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar maintained.</p>
9eba541375dc59662e214e106e33b909b4c477ddrbowen
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>In addition, on some platforms, like Win32, and on unix when
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar using <a href="/suexec.html">suexec</a>, you cannot pass arguments
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar to a command in an <code>exec</code> directive, or otherwise include
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar spaces in the command. Thus, while the following will work under a
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar non-suexec configuration on unix, it will not produce the desired
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar result under Win32, or when running suexec:</p>
9eba541375dc59662e214e106e33b909b4c477ddrbowen
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <div class="example"><p><code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar &lt;!--#exec cmd="perl /path/to/perlscript arg1 arg2" --&gt;
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </code></p></div>
9eba541375dc59662e214e106e33b909b4c477ddrbowen </dd>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </dl>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
9eba541375dc59662e214e106e33b909b4c477ddrbowen
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <h3><a name="element.fsize" id="element.fsize">The fsize Element</a></h3>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>This command prints the size of the specified file, subject
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar to the <code>sizefmt</code> format specification. Attributes:</p>
9eba541375dc59662e214e106e33b909b4c477ddrbowen
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dl>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dt><code>file</code></dt>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dd>The value is a path relative to the directory
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar containing the current document being parsed.
06ba4a61654b3763ad65f52283832ebf058fdf1cslive
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <div class="example"><p><code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar This file is &lt;!--#fsize file="mod_include.html" --&gt; bytes.
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </code></p></div>
491856cfdee8ce7c5eb4d4886784713bebad2e80nd
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar The value of <code>file</code> cannot start with a slash
a99c5d4cc3cab6a62b04d52000dbc22ce1fa2d94coar (<code>/</code>), nor can it contain <code>../</code> so as to
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar refer to a file above the current directory or outside of the
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar document root. Attempting to so will result in the error message:
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code>The given path was above the root path</code>.
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </dd>
491856cfdee8ce7c5eb4d4886784713bebad2e80nd
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dt><code>virtual</code></dt>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dd>The value is a (%-encoded) URL-path. If it does not begin with
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar a slash (/) then it is taken to be relative to the current document.
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar Note, that this does <em>not</em> print the size of any CGI output,
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar but the size of the CGI script itself.</dd>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </dl>
491856cfdee8ce7c5eb4d4886784713bebad2e80nd
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <div class="example"><p><code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar This file is &lt;!--#fsize virtual="/docs/mod/mod_include.html" --&gt; bytes.
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </code></p></div>
491856cfdee8ce7c5eb4d4886784713bebad2e80nd
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>Note that in many cases these two are exactly the same thing.
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar However, the <code>file</code> attribute doesn't respect URL-space
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar aliases.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
491856cfdee8ce7c5eb4d4886784713bebad2e80nd
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <h3><a name="element.flastmod" id="element.flastmod">The flastmod Element</a></h3>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>This command prints the last modification date of the
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar specified file, subject to the <code>timefmt</code> format
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar specification. The attributes are the same as for the
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code><a href="#element.fsize">fsize</a></code> command.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
491856cfdee8ce7c5eb4d4886784713bebad2e80nd
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <h3><a name="element.include" id="element.include">The include Element</a></h3>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>This command inserts the text of another document or file
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar into the parsed file. Any included file is subject to the usual
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar access control. If the directory containing the parsed file has
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <a href="core.html#options">Options</a>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code>IncludesNOEXEC</code> set, then only documents with a text
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <a class="glossarylink" href="/glossary.html#mime-type" title="see glossary">MIME-type</a> (<code>text/plain</code>,
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code>text/html</code> etc.) will be included. Otherwise CGI
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar scripts are invoked as normal using the complete URL given in
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar the command, including any query string.</p>
9045f2b0105b8611a11467cbc6c0db9b7b6c3bf4minfrin
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>An attribute defines the location of the document, and may
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar appear more than once in an include element; an inclusion is
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar done for each attribute given to the include command in turn.
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar The valid attributes are:</p>
9045f2b0105b8611a11467cbc6c0db9b7b6c3bf4minfrin
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dl>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dt><code>file</code></dt>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dd>The value is a path relative to the directory
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar containing the current document being parsed. It cannot
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar contain <code>../</code>, nor can it be an absolute path.
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar Therefore, you cannot include files that are outside of the
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar document root, or above the current document in the directory
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar structure. The <code>virtual</code> attribute should always be
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar used in preference to this one.</dd>
9106e4bad275afc1241ad989aa11aa208f70dd53minfrin
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dt><code><a id="includevirtual" name="includevirtual">virtual</a></code></dt>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dd><p>The value is a (%-encoded) URL-path. The URL cannot contain a
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar scheme or hostname, only a path and an optional query string. If it
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar does not begin with a slash (/) then it is taken to be relative to the
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar current document.</p>
9106e4bad275afc1241ad989aa11aa208f70dd53minfrin
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>A URL is constructed from the attribute, and the output the
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar server would return if the URL were accessed by the client is
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar included in the parsed output. Thus included files can be nested.</p>
9045f2b0105b8611a11467cbc6c0db9b7b6c3bf4minfrin
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>If the specified URL is a CGI program, the program will be
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar executed and its output inserted in place of the directive in the
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar parsed file. You may include a query string in a CGI url:</p>
564ee5b847469eb8a61120179ce70a0213965785rbowen
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <div class="example"><p><code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar &lt;!--#include virtual="/cgi-bin/example.cgi?argument=value" --&gt;
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </code></p></div>
564ee5b847469eb8a61120179ce70a0213965785rbowen
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p><code>include virtual</code> should be used in preference
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar to <code>exec cgi</code> to include the output of CGI programs
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar into an HTML document.</p>
564ee5b847469eb8a61120179ce70a0213965785rbowen
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>If the <code class="directive"><a href="/mod/mod_request.html#keptbodysize">KeptBodySize</a></code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar directive is correctly configured and valid for this included
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar file, attempts to POST requests to the enclosing HTML document
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar will be passed through to subrequests as POST requests as well.
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar Without the directive, all subrequests are processed as GET
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar requests.</p>
9045f2b0105b8611a11467cbc6c0db9b7b6c3bf4minfrin
564ee5b847469eb8a61120179ce70a0213965785rbowen </dd>
564ee5b847469eb8a61120179ce70a0213965785rbowen
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dt><code>onerror</code></dt>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dd><p>The value is a (%-encoded) URL-path which is shown should a
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar previous attempt to include a file or virtual attribute failed.
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar To be effective, this attribute must be specified after the
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar file or virtual attributes being covered. If the attempt to
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar include the onerror path fails, or if onerror is not specified, the
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar default error message will be included.</p>
9045f2b0105b8611a11467cbc6c0db9b7b6c3bf4minfrin
9045f2b0105b8611a11467cbc6c0db9b7b6c3bf4minfrin <div class="example"><p><code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar # Simple example<br />
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar &lt;!--#include virtual="/not-exist.html" onerror="/error.html" --&gt;
9045f2b0105b8611a11467cbc6c0db9b7b6c3bf4minfrin </code></p></div>
9045f2b0105b8611a11467cbc6c0db9b7b6c3bf4minfrin
564ee5b847469eb8a61120179ce70a0213965785rbowen <div class="example"><p><code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar # Dedicated onerror paths<br />
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar &lt;!--#include virtual="/path-a.html" onerror="/error-a.html" virtual="/path-b.html" onerror="/error-b.html" --&gt;
564ee5b847469eb8a61120179ce70a0213965785rbowen </code></p></div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
06ba4a61654b3763ad65f52283832ebf058fdf1cslive </dd>
491856cfdee8ce7c5eb4d4886784713bebad2e80nd </dl>
491856cfdee8ce7c5eb4d4886784713bebad2e80nd
06ba4a61654b3763ad65f52283832ebf058fdf1cslive
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <h3><a name="element.printenv" id="element.printenv">The printenv Element</a></h3>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>This prints out a plain text listing of all existing variables and
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar their values. Special characters are entity encoded (see the <code><a href="#element.echo">echo</a></code> element for details)
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar before being output. There are no attributes.</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <div class="example"><h3>Example</h3><p><code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar &lt;pre&gt;
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar &lt;!--#printenv --&gt;
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar &lt;/pre&gt;
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </code></p></div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <h3><a name="element.set" id="element.set">The set Element</a></h3>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>This sets the value of a variable. Attributes:</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive
491856cfdee8ce7c5eb4d4886784713bebad2e80nd <dl>
491856cfdee8ce7c5eb4d4886784713bebad2e80nd <dt><code>var</code></dt>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dd>The name of the variable to set.</dd>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dt><code>value</code></dt>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dd>The value to give a variable.</dd>
fd9401e51a6e07fe680e870ba9f028c176970aa8minfrin
fd9401e51a6e07fe680e870ba9f028c176970aa8minfrin <dt><code>decoding</code></dt>
fd9401e51a6e07fe680e870ba9f028c176970aa8minfrin <dd><p>Specifies whether Apache should strip an encoding from
fd9401e51a6e07fe680e870ba9f028c176970aa8minfrin the variable before processing the variable further. The default
fd9401e51a6e07fe680e870ba9f028c176970aa8minfrin is <code>none</code>, where no decoding will be done. If set to
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code>url</code>, <code>urlencoded</code>, <code>base64</code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar or <code>entity</code>, URL decoding,
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar application/x-www-form-urlencoded decoding, base64 decoding or HTML
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar entity decoding will be performed respectively. More than one
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar decoding can be specified by separating with commas. The decoding
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar setting will remain in effect until the next decoding attribute
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar is encountered, or the element ends. The <code>decoding</code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar attribute must <em>precede</em> the corresponding
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code>var</code> attribute to be effective.</p>
fd9401e51a6e07fe680e870ba9f028c176970aa8minfrin </dd>
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf
fd9401e51a6e07fe680e870ba9f028c176970aa8minfrin <dt><code>encoding</code></dt>
fd9401e51a6e07fe680e870ba9f028c176970aa8minfrin <dd><p>Specifies how Apache should encode special characters
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar contained in the variable before setting them. The default is
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code>none</code>, where no encoding will be done. If set to
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code>url</code>, <code>urlencoding</code>, <code>base64</code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar or <code>entity</code>, URL encoding,
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar application/x-www-form-urlencoded encoding, base64 encoding or
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar HTML entity encoding will be performed respectively. More than
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar one encoding can be specified by separating with commas. The
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar encoding setting will remain in effect until the next encoding
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar attribute is encountered, or the element ends. The
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code>encoding</code> attribute must <em>precede</em> the
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar corresponding <code>var</code> attribute to be effective.
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar Encodings are applied after all decodings have been
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar stripped.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </dd>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </dl>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive
491856cfdee8ce7c5eb4d4886784713bebad2e80nd <div class="example"><h3>Example</h3><p><code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar &lt;!--#set var="category" value="help" --&gt;
491856cfdee8ce7c5eb4d4886784713bebad2e80nd </code></p></div>
491856cfdee8ce7c5eb4d4886784713bebad2e80nd
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar</div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<div class="section">
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<h2><a name="includevars" id="includevars">Include Variables</a></h2>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
c8c717fafa0a09ed13469a603a178921b851dd22igalic
564ee5b847469eb8a61120179ce70a0213965785rbowen <p>In addition to the variables in the standard CGI environment,
564ee5b847469eb8a61120179ce70a0213965785rbowen these are available for the <code>echo</code> command, for
564ee5b847469eb8a61120179ce70a0213965785rbowen <code>if</code> and <code>elif</code>, and to any program
564ee5b847469eb8a61120179ce70a0213965785rbowen invoked by the document.</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive
564ee5b847469eb8a61120179ce70a0213965785rbowen <dl>
564ee5b847469eb8a61120179ce70a0213965785rbowen <dt><code>DATE_GMT</code></dt>
564ee5b847469eb8a61120179ce70a0213965785rbowen <dd>The current date in Greenwich Mean Time.</dd>
2d24960fa1e6afc7ad5f1bf58b6b3f5e7a9a3497humbedooh
564ee5b847469eb8a61120179ce70a0213965785rbowen <dt><code>DATE_LOCAL</code></dt>
564ee5b847469eb8a61120179ce70a0213965785rbowen <dd>The current date in the local time zone.</dd>
97a9a944b5887e91042b019776c41d5dd74557aferikabele
564ee5b847469eb8a61120179ce70a0213965785rbowen <dt><code>DOCUMENT_NAME</code></dt>
564ee5b847469eb8a61120179ce70a0213965785rbowen <dd>The filename (excluding directories) of the document
564ee5b847469eb8a61120179ce70a0213965785rbowen requested by the user.</dd>
b686b6a420bde7f78c416b90be11db94cb789979nd
564ee5b847469eb8a61120179ce70a0213965785rbowen <dt><code>DOCUMENT_URI</code></dt>
564ee5b847469eb8a61120179ce70a0213965785rbowen <dd>The (%-decoded) URL path of the document requested by the
564ee5b847469eb8a61120179ce70a0213965785rbowen user. Note that in the case of nested include files, this is
564ee5b847469eb8a61120179ce70a0213965785rbowen <em>not</em> the URL for the current document. Note also that
564ee5b847469eb8a61120179ce70a0213965785rbowen if the URL is modified internally (e.g. by an <code class="directive"><a href="/mod/mod_alias.html#alias">alias</a></code> or <code class="directive"><a href="/mod/mod_dir.html#directoryindex">directoryindex</a></code>), the modified
564ee5b847469eb8a61120179ce70a0213965785rbowen URL is shown.</dd>
491856cfdee8ce7c5eb4d4886784713bebad2e80nd
564ee5b847469eb8a61120179ce70a0213965785rbowen <dt><code>LAST_MODIFIED</code></dt>
564ee5b847469eb8a61120179ce70a0213965785rbowen <dd>The last modification date of the document requested by
564ee5b847469eb8a61120179ce70a0213965785rbowen the user.</dd>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive
564ee5b847469eb8a61120179ce70a0213965785rbowen <dt><code>QUERY_STRING_UNESCAPED</code></dt>
564ee5b847469eb8a61120179ce70a0213965785rbowen <dd>If a query string is present, this variable contains the
564ee5b847469eb8a61120179ce70a0213965785rbowen (%-decoded) query string, which is <em>escaped</em> for shell
564ee5b847469eb8a61120179ce70a0213965785rbowen usage (special characters like <code>&amp;</code> etc. are
564ee5b847469eb8a61120179ce70a0213965785rbowen preceded by backslashes).</dd>
564ee5b847469eb8a61120179ce70a0213965785rbowen </dl>
564ee5b847469eb8a61120179ce70a0213965785rbowen</div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
564ee5b847469eb8a61120179ce70a0213965785rbowen<div class="section">
564ee5b847469eb8a61120179ce70a0213965785rbowen<h2><a name="substitution" id="substitution">Variable Substitution</a></h2>
2d24960fa1e6afc7ad5f1bf58b6b3f5e7a9a3497humbedooh
564ee5b847469eb8a61120179ce70a0213965785rbowen <p>Variable substitution is done within quoted strings in most
564ee5b847469eb8a61120179ce70a0213965785rbowen cases where they may reasonably occur as an argument to an SSI
564ee5b847469eb8a61120179ce70a0213965785rbowen directive. This includes the <code>config</code>,
564ee5b847469eb8a61120179ce70a0213965785rbowen <code>exec</code>, <code>flastmod</code>, <code>fsize</code>,
564ee5b847469eb8a61120179ce70a0213965785rbowen <code>include</code>, <code>echo</code>, and <code>set</code>
564ee5b847469eb8a61120179ce70a0213965785rbowen directives. If <code class="directive"><a href="#ssilegacyexprparser">SSILegacyExprParser</a></code> is set to <code>on</code>,
564ee5b847469eb8a61120179ce70a0213965785rbowen substitution also occurs in the arguments to conditional operators.
564ee5b847469eb8a61120179ce70a0213965785rbowen You can insert a literal dollar sign into the string using backslash
564ee5b847469eb8a61120179ce70a0213965785rbowen quoting:</p>
b686b6a420bde7f78c416b90be11db94cb789979nd
564ee5b847469eb8a61120179ce70a0213965785rbowen <div class="example"><p><code>
564ee5b847469eb8a61120179ce70a0213965785rbowen &lt;!--#set var="cur" value="\$test" --&gt;
564ee5b847469eb8a61120179ce70a0213965785rbowen </code></p></div>
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin
564ee5b847469eb8a61120179ce70a0213965785rbowen <p>If a variable reference needs to be substituted in the
564ee5b847469eb8a61120179ce70a0213965785rbowen middle of a character sequence that might otherwise be
564ee5b847469eb8a61120179ce70a0213965785rbowen considered a valid identifier in its own right, it can be
564ee5b847469eb8a61120179ce70a0213965785rbowen disambiguated by enclosing the reference in braces,
564ee5b847469eb8a61120179ce70a0213965785rbowen <em>a la</em> shell substitution:</p>
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin
564ee5b847469eb8a61120179ce70a0213965785rbowen <div class="example"><p><code>
564ee5b847469eb8a61120179ce70a0213965785rbowen &lt;!--#set var="Zed" value="${REMOTE_HOST}_${REQUEST_METHOD}" --&gt;
564ee5b847469eb8a61120179ce70a0213965785rbowen </code></p></div>
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin
564ee5b847469eb8a61120179ce70a0213965785rbowen <p>This will result in the <code>Zed</code> variable being set
564ee5b847469eb8a61120179ce70a0213965785rbowen to "<code>X_Y</code>" if <code>REMOTE_HOST</code> is
564ee5b847469eb8a61120179ce70a0213965785rbowen "<code>X</code>" and <code>REQUEST_METHOD</code> is
564ee5b847469eb8a61120179ce70a0213965785rbowen "<code>Y</code>".</p>
564ee5b847469eb8a61120179ce70a0213965785rbowen</div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
564ee5b847469eb8a61120179ce70a0213965785rbowen<div class="section">
564ee5b847469eb8a61120179ce70a0213965785rbowen<h2><a name="flowctrl" id="flowctrl">Flow Control Elements</a></h2>
564ee5b847469eb8a61120179ce70a0213965785rbowen
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin
564ee5b847469eb8a61120179ce70a0213965785rbowen <p>The basic flow control elements are:</p>
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin
564ee5b847469eb8a61120179ce70a0213965785rbowen <div class="example"><p><code>
564ee5b847469eb8a61120179ce70a0213965785rbowen &lt;!--#if expr="<var>test_condition</var>" --&gt;<br />
564ee5b847469eb8a61120179ce70a0213965785rbowen &lt;!--#elif expr="<var>test_condition</var>" --&gt;<br />
564ee5b847469eb8a61120179ce70a0213965785rbowen &lt;!--#else --&gt;<br />
564ee5b847469eb8a61120179ce70a0213965785rbowen &lt;!--#endif --&gt;
564ee5b847469eb8a61120179ce70a0213965785rbowen </code></p></div>
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin
564ee5b847469eb8a61120179ce70a0213965785rbowen <p>The <code>if</code> element works like an if statement in a
564ee5b847469eb8a61120179ce70a0213965785rbowen programming language. The test condition is evaluated and if
564ee5b847469eb8a61120179ce70a0213965785rbowen the result is true, then the text until the next <code>elif</code>,
564ee5b847469eb8a61120179ce70a0213965785rbowen <code>else</code> or <code>endif</code> element is included in the
564ee5b847469eb8a61120179ce70a0213965785rbowen output stream.</p>
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin
564ee5b847469eb8a61120179ce70a0213965785rbowen <p>The <code>elif</code> or <code>else</code> statements are used
564ee5b847469eb8a61120179ce70a0213965785rbowen to put text into the output stream if the original
564ee5b847469eb8a61120179ce70a0213965785rbowen <var>test_condition</var> was false. These elements are optional.</p>
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin
564ee5b847469eb8a61120179ce70a0213965785rbowen <p>The <code>endif</code> element ends the <code>if</code> element
564ee5b847469eb8a61120179ce70a0213965785rbowen and is required.</p>
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf
564ee5b847469eb8a61120179ce70a0213965785rbowen <p><var>test_condition</var> is a boolean expression which follows the
564ee5b847469eb8a61120179ce70a0213965785rbowen <a href="/expr.html">ap_expr</a> syntax. The syntax can be changed
564ee5b847469eb8a61120179ce70a0213965785rbowen to be compatible with Apache HTTPD 2.2.x using <code class="directive"><a href="#ssilegacyexprparser">SSILegacyExprParser</a></code>.</p>
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf
564ee5b847469eb8a61120179ce70a0213965785rbowen <p>The SSI variables set with the <code>var</code> element are exported
564ee5b847469eb8a61120179ce70a0213965785rbowen into the request environment and can be accessed with the
564ee5b847469eb8a61120179ce70a0213965785rbowen <code>reqenv</code> function. As a short-cut, the function name
564ee5b847469eb8a61120179ce70a0213965785rbowen <code>v</code> is also available inside <code class="module"><a href="/mod/mod_include.html">mod_include</a></code>.</p>
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf
564ee5b847469eb8a61120179ce70a0213965785rbowen <p>The below example will print "from local net" if client IP address
564ee5b847469eb8a61120179ce70a0213965785rbowen belongs to the 10.0.0.0/8 subnet.</p>
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf
564ee5b847469eb8a61120179ce70a0213965785rbowen <div class="example"><p><code>
564ee5b847469eb8a61120179ce70a0213965785rbowen &lt;!--#if expr='-R "10.0.0.0/8"' --&gt;<br />
564ee5b847469eb8a61120179ce70a0213965785rbowen <span class="indent">
564ee5b847469eb8a61120179ce70a0213965785rbowen from local net<br />
564ee5b847469eb8a61120179ce70a0213965785rbowen </span>
564ee5b847469eb8a61120179ce70a0213965785rbowen &lt;!--#else --&gt;<br />
564ee5b847469eb8a61120179ce70a0213965785rbowen <span class="indent">
564ee5b847469eb8a61120179ce70a0213965785rbowen from somewhere else<br />
564ee5b847469eb8a61120179ce70a0213965785rbowen </span>
564ee5b847469eb8a61120179ce70a0213965785rbowen &lt;!--#endif --&gt;
564ee5b847469eb8a61120179ce70a0213965785rbowen </code></p></div>
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>The below example will print "foo is bar" if the variable
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code>foo</code> is set to the value "bar".</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <div class="example"><p><code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar &lt;!--#if expr='v("foo") = "bar"' --&gt;<br />
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <span class="indent">
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar foo is bar<br />
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </span>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar &lt;!--#endif --&gt;
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </code></p></div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <div class="note"><h3>Reference Documentation</h3>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>See also: <a href="/expr.html">Expressions in Apache HTTP Server</a>,
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar for a complete reference and examples. The <em>restricted</em> functions
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar are not available inside <code class="module"><a href="/mod/mod_include.html">mod_include</a></code></p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar</div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<div class="section">
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<h2><a name="legacyexpr" id="legacyexpr">Legacy expression syntax</a></h2>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>This section describes the syntax of the <code>#if expr</code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar element if <code class="directive"><a href="#ssilegacyexprparser">SSILegacyExprParser</a></code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar is set to <code>on</code>.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dl>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dt><code><var>string</var></code></dt>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dd>true if <var>string</var> is not empty</dd>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dt><code><var>-A string</var></code></dt>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dd><p>true if the URL represented by the string is accessible by
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar configuration, false otherwise. This is useful where content on a
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar page is to be hidden from users who are not authorized to view the
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar URL, such as a link to that URL. Note that the URL is only tested
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar for whether access would be granted, not whether the URL exists.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <div class="example"><h3>Example</h3><p><code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar &lt;!--#if expr="-A /private" --&gt;<br />
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <span class="indent">
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar Click &lt;a href="/private"&gt;here&lt;/a&gt; to access private
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar information.<br />
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </span>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar &lt;!--#endif --&gt;
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </code></p></div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </dd>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dt><code><var>string1</var> = <var>string2</var><br />
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <var>string1</var> == <var>string2</var><br />
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <var>string1</var> != <var>string2</var></code></dt>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dd><p>Compare <var>string1</var> with <var>string2</var>. If
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <var>string2</var> has the form <code>/<var>string2</var>/</code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar then it is treated as a regular expression. Regular expressions are
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar implemented by the <a href="http://www.pcre.org">PCRE</a> engine and
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar have the same syntax as those in <a href="http://www.perl.com">perl
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar 5</a>. Note that <code>==</code> is just an alias for <code>=</code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar and behaves exactly the same way.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>If you are matching positive (<code>=</code> or <code>==</code>), you
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar can capture grouped parts of the regular expression. The captured parts
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar are stored in the special variables <code>$1</code> ..
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code>$9</code>. The whole string matched by the regular expression is
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar stored in the special variable <code>$0</code></p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <div class="example"><h3>Example</h3><p><code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar &lt;!--#if expr="$QUERY_STRING = /^sid=([a-zA-Z0-9]+)/" --&gt;<br />
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <span class="indent">
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar &lt;!--#set var="session" value="$1" --&gt;<br />
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </span>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar &lt;!--#endif --&gt;
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </code></p></div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </dd>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dt><code><var>string1</var> &lt; <var>string2</var><br />
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <var>string1</var> &lt;= <var>string2</var><br />
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <var>string1</var> &gt; <var>string2</var><br />
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <var>string1</var> &gt;= <var>string2</var></code></dt>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dd>Compare <var>string1</var> with <var>string2</var>. Note, that
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar strings are compared <em>literally</em> (using
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code>strcmp(3)</code>). Therefore the string "100" is less than
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar "20".</dd>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dt><code>( <var>test_condition</var> )</code></dt>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dd>true if <var>test_condition</var> is true</dd>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dt><code>! <var>test_condition</var></code></dt>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dd>true if <var>test_condition</var> is false</dd>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dt><code><var>test_condition1</var> &amp;&amp;
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <var>test_condition2</var></code></dt>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dd>true if both <var>test_condition1</var> and
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <var>test_condition2</var> are true</dd>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dt><code><var>test_condition1</var> ||
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <var>test_condition2</var></code></dt>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dd>true if either <var>test_condition1</var> or
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <var>test_condition2</var> is true</dd>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </dl>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>"<code>=</code>" and "<code>!=</code>" bind more tightly than
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar "<code>&amp;&amp;</code>" and "<code>||</code>". "<code>!</code>" binds
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar most tightly. Thus, the following are equivalent:</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <div class="example"><p><code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar &lt;!--#if expr="$a = test1 &amp;&amp; $b = test2" --&gt;<br />
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar &lt;!--#if expr="($a = test1) &amp;&amp; ($b = test2)" --&gt;
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </code></p></div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>The boolean operators <code>&amp;&amp;</code> and <code>||</code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar share the same priority. So if you want to bind such an operator more
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar tightly, you should use parentheses.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>Anything that's not recognized as a variable or an operator
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar is treated as a string. Strings can also be quoted:
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code>'string'</code>. Unquoted strings can't contain whitespace
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar (blanks and tabs) because it is used to separate tokens such as
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar variables. If multiple strings are found in a row, they are
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar concatenated using blanks. So,</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <div class="example"><p><code><var>string1</var>&nbsp;&nbsp;&nbsp;&nbsp;<var>string2</var></code> results in <code><var>string1</var>&nbsp;<var>string2</var></code><br />
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <br />
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar and<br />
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <br />
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code>'<var>string1</var>&nbsp;&nbsp;&nbsp;&nbsp;<var>string2</var>'</code> results in <code><var>string1</var>&nbsp;&nbsp;&nbsp;&nbsp;<var>string2</var></code>.</p></div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <div class="note"><h3>Optimization of Boolean Expressions</h3>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>If the expressions become more complex and slow down processing
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar significantly, you can try to optimize them according to the
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar evaluation rules:</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <ul>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <li>Expressions are evaluated from left to right</li>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <li>Binary boolean operators (<code>&amp;&amp;</code> and <code>||</code>)
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar are short circuited wherever possible. In conclusion with the rule
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar above that means, <code class="module"><a href="/mod/mod_include.html">mod_include</a></code> evaluates at first
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar the left expression. If the left result is sufficient to determine
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar the end result, processing stops here. Otherwise it evaluates the
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar right side and computes the end result from both left and right
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar results.</li>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <li>Short circuit evaluation is turned off as long as there are regular
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar expressions to deal with. These must be evaluated to fill in the
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar backreference variables (<code>$1</code> .. <code>$9</code>).</li>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </ul>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>If you want to look how a particular expression is handled, you can
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar recompile <code class="module"><a href="/mod/mod_include.html">mod_include</a></code> using the
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code>-DDEBUG_INCLUDE</code> compiler option. This inserts for every
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar parsed expression tokenizer information, the parse tree and how it is
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar evaluated into the output sent to the client.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <div class="note"><h3>Escaping slashes in regex strings</h3>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>All slashes which are not intended to act as delimiters in your regex must
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar be escaped. This is regardless of their meaning to the regex engine.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar</div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<div class="directive-section"><h2><a name="SSIEndTag" id="SSIEndTag">SSIEndTag</a> <a name="ssiendtag" id="ssiendtag">Directive</a></h2>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<table class="directive">
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>String that ends an include element</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSIEndTag <var>tag</var></code></td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSIEndTag "--&gt;"</code></td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_include</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar</table>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>This directive changes the string that <code class="module"><a href="/mod/mod_include.html">mod_include</a></code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar looks for to mark the end of an include element.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <pre class="prettyprint lang-config">SSIEndTag "%&gt;"</pre>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<h3>See also</h3>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<ul>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<li><code class="directive"><a href="#ssistarttag">SSIStartTag</a></code></li>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar</ul>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar</div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<div class="directive-section"><h2><a name="SSIErrorMsg" id="SSIErrorMsg">SSIErrorMsg</a> <a name="ssierrormsg" id="ssierrormsg">Directive</a></h2>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<table class="directive">
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Error message displayed when there is an SSI
1f1b6bf13313fdd14a45e52e553d3ff28689b717coarerror</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSIErrorMsg <var>message</var></code></td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSIErrorMsg "[an error occurred while processing this
1f1b6bf13313fdd14a45e52e553d3ff28689b717coardirective]"</code></td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_include</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar</table>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>The <code class="directive">SSIErrorMsg</code> directive changes the error
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar message displayed when <code class="module"><a href="/mod/mod_include.html">mod_include</a></code> encounters an
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar error. For production servers you may consider changing the default
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar error message to <code>"&lt;!-- Error --&gt;"</code> so that
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar the message is not presented to the user.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>This directive has the same effect as the <code>&lt;!--#config
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar errmsg=<var>message</var> --&gt;</code> element.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <pre class="prettyprint lang-config">SSIErrorMsg "&lt;!-- Error --&gt;"</pre>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar</div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<div class="directive-section"><h2><a name="SSIETag" id="SSIETag">SSIETag</a> <a name="ssietag" id="ssietag">Directive</a></h2>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<table class="directive">
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Controls whether ETags are generated by the server.</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSIETag on|off</code></td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSIETag off</code></td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_include</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar</table>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>Under normal circumstances, a file filtered by <code class="module"><a href="/mod/mod_include.html">mod_include</a></code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar may contain elements that are either dynamically generated, or that may
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar have changed independently of the original file. As a result, by default
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar the server is asked not to generate an <code>ETag</code> header for the
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar response by adding <code>no-etag</code> to the request notes.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>The <code class="directive">SSIETag</code> directive suppresses this
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar behaviour, and allows the server to generate an <code>ETag</code> header.
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar This can be used to enable caching of the output. Note that a backend server
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar or dynamic content generator may generate an ETag of its own, ignoring
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code>no-etag</code>, and this ETag will be passed by
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code class="module"><a href="/mod/mod_include.html">mod_include</a></code> regardless of the value of this setting.
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code class="directive">SSIETag</code> can take on the following values:</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dl>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dt><code>off</code></dt>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dd><code>no-etag</code> will be added to the request notes, and the server
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar is asked not to generate an ETag. Where a server ignores the value of
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code>no-etag</code> and generates an ETag anyway, the ETag will be
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar respected.</dd>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dt><code>on</code></dt>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dd>Existing ETags will be respected, and ETags generated by the server will
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar be passed on in the response.</dd>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </dl>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar</div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<div class="directive-section"><h2><a name="SSILastModified" id="SSILastModified">SSILastModified</a> <a name="ssilastmodified" id="ssilastmodified">Directive</a></h2>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<table class="directive">
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Controls whether <code>Last-Modified</code> headers are generated by the
1f1b6bf13313fdd14a45e52e553d3ff28689b717coarserver.</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSILastModified on|off</code></td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSILastModified off</code></td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_include</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar</table>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>Under normal circumstances, a file filtered by <code class="module"><a href="/mod/mod_include.html">mod_include</a></code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar may contain elements that are either dynamically generated, or that may
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar have changed independently of the original file. As a result, by default
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar the <code>Last-Modified</code> header is stripped from the response.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>The <code class="directive">SSILastModified</code> directive overrides this
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar behaviour, and allows the <code>Last-Modified</code> header to be respected
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar if already present, or set if the header is not already present. This can
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar be used to enable caching of the output. <code class="directive">SSILastModified</code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar can take on the following values:</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dl>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dt><code>off</code></dt>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dd>The <code>Last-Modified</code> header will be stripped from responses,
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar unless the <code class="directive"><a href="#xbithack">XBitHack</a></code> directive
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar is set to <code>full</code> as described below.</dd>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dt><code>on</code></dt>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dd>The <code>Last-Modified</code> header will be respected if already
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar present in a response, and added to the response if the response is a
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar file and the header is missing. The
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code class="directive"><a href="#ssilastmodified">SSILastModified</a></code> directive
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar takes precedence over <code class="directive"><a href="#xbithack">XBitHack</a></code>.</dd>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </dl>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar</div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<div class="directive-section"><h2><a name="SSILegacyExprParser" id="SSILegacyExprParser">SSILegacyExprParser</a> <a name="ssilegacyexprparser" id="ssilegacyexprparser">Directive</a></h2>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<table class="directive">
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enable compatibility mode for conditional expressions.</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSILegacyExprParser on|off</code></td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSILegacyExprParser off</code></td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_include</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in version 2.3.13 and later.</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar</table>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>As of version 2.3.13, <code class="module"><a href="/mod/mod_include.html">mod_include</a></code> has switched to the
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar new <a href="/expr.html">ap_expr</a> syntax for conditional expressions
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar in <code>#if</code> flow control elements. This directive allows to
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar switch to the <a href="#legacyexpr">old syntax</a> which is compatible
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar with Apache HTTPD version 2.2.x and earlier.
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </p>
fcd7f1f7d11d39b8379972a455e1c7e67a5dfa9dsf
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar</div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<div class="directive-section"><h2><a name="SSIStartTag" id="SSIStartTag">SSIStartTag</a> <a name="ssistarttag" id="ssistarttag">Directive</a></h2>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<table class="directive">
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>String that starts an include element</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSIStartTag <var>tag</var></code></td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSIStartTag "&lt;!--#"</code></td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_include</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar</table>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>This directive changes the string that <code class="module"><a href="/mod/mod_include.html">mod_include</a></code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar looks for to mark an include element to process.</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>You may want to use this option if you have 2 servers parsing the
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar output of a file each processing different commands (possibly at
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar different times).</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <pre class="prettyprint lang-config"> SSIStartTag "&lt;%"<br />
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar SSIEndTag "%&gt;"</pre>
2d24960fa1e6afc7ad5f1bf58b6b3f5e7a9a3497humbedooh
308abf52d418c00c19624cd4445d3b562b7eae81rbowen
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>The example given above, which also specifies a matching
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code class="directive"><a href="#ssiendtag">SSIEndTag</a></code>, will
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar allow you to use SSI directives as shown in the example
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar below:</p>
308abf52d418c00c19624cd4445d3b562b7eae81rbowen
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <div class="example"><h3>SSI directives with alternate start and end tags</h3><p><code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar &lt;%printenv %&gt;
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </code></p></div>
b686b6a420bde7f78c416b90be11db94cb789979nd
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<h3>See also</h3>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<ul>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<li><code class="directive"><a href="#ssiendtag">SSIEndTag</a></code></li>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar</ul>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar</div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<div class="directive-section"><h2><a name="SSITimeFormat" id="SSITimeFormat">SSITimeFormat</a> <a name="ssitimeformat" id="ssitimeformat">Directive</a></h2>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<table class="directive">
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures the format in which date strings are
1f1b6bf13313fdd14a45e52e553d3ff28689b717coardisplayed</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSITimeFormat <var>formatstring</var></code></td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<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>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_include</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar</table>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<p>This directive changes the format in which date strings are displayed
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar when echoing <code>DATE</code> environment variables. The
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <var>formatstring</var> is as in <code>strftime(3)</code> from the
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar C standard library.</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>This directive has the same effect as the <code>&lt;!--#config
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar timefmt=<var>formatstring</var> --&gt;</code> element.</p>
308abf52d418c00c19624cd4445d3b562b7eae81rbowen
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <pre class="prettyprint lang-config">SSITimeFormat "%R, %B %d, %Y"</pre>
2d24960fa1e6afc7ad5f1bf58b6b3f5e7a9a3497humbedooh
308abf52d418c00c19624cd4445d3b562b7eae81rbowen
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>The above directive would cause times to be displayed in the
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar format "22:26, June 14, 2002".</p>
b686b6a420bde7f78c416b90be11db94cb789979nd
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar</div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<div class="directive-section"><h2><a name="SSIUndefinedEcho" id="SSIUndefinedEcho">SSIUndefinedEcho</a> <a name="ssiundefinedecho" id="ssiundefinedecho">Directive</a></h2>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<table class="directive">
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>String displayed when an unset variable is echoed</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSIUndefinedEcho <var>string</var></code></td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSIUndefinedEcho "(none)"</code></td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_include</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar</table>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>This directive changes the string that <code class="module"><a href="/mod/mod_include.html">mod_include</a></code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar displays when a variable is not set and "echoed".</p>
308abf52d418c00c19624cd4445d3b562b7eae81rbowen
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <pre class="prettyprint lang-config">SSIUndefinedEcho "&lt;!-- undef --&gt;"</pre>
2d24960fa1e6afc7ad5f1bf58b6b3f5e7a9a3497humbedooh
b686b6a420bde7f78c416b90be11db94cb789979nd
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar</div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<div class="directive-section"><h2><a name="XBitHack" id="XBitHack">XBitHack</a> <a name="xbithack" id="xbithack">Directive</a></h2>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<table class="directive">
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Parse SSI directives in files with the execute bit
1f1b6bf13313fdd14a45e52e553d3ff28689b717coarset</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>XBitHack on|off|full</code></td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>XBitHack off</code></td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Options</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_include</td></tr>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar</table>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>The <code class="directive">XBitHack</code> directive controls the parsing
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar of ordinary html documents. This directive only affects files associated
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar with the <a class="glossarylink" href="/glossary.html#mime-type" title="see glossary">MIME-type</a> <code>text/html</code>. <code class="directive">XBitHack</code> can take on the following values:</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dl>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dt><code>off</code></dt>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dd>No special treatment of executable files.</dd>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dt><code>on</code></dt>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dd>Any <code>text/html</code> file that has the user-execute bit
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar set will be treated as a server-parsed html document.</dd>
491856cfdee8ce7c5eb4d4886784713bebad2e80nd
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dt><code>full</code></dt>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <dd>As for <code>on</code> but also test the group-execute bit.
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar If it is set, then set the <code>Last-modified</code> date of the
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar returned file to be the last modified time of the file. If
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar it is not set, then no last-modified date is sent. Setting
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar this bit allows clients and proxies to cache the result of
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar the request.
491856cfdee8ce7c5eb4d4886784713bebad2e80nd
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <div class="note"><h3>Note</h3>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>You would not want to use the full option, unless you assure the
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar group-execute bit is unset for every SSI script which might <code>#include</code> a CGI or otherwise produces different output on
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar each hit (or could potentially change on subsequent requests).</p>
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>The <code class="directive"><a href="#ssilastmodified">SSILastModified</a></code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar directive takes precedence over the
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code class="directive"><a href="#xbithack">XBitHack</a></code> directive when
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code class="directive"><a href="#ssilastmodified">SSILastModified</a></code> is set to
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code>on</code>.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </div>
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </dd>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar </dl>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive
e988bb6eb9fc78eafc52c8e2a9e0ee3da7b2de4end
b686b6a420bde7f78c416b90be11db94cb789979nd</div>
b686b6a420bde7f78c416b90be11db94cb789979nd</div>
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd<div class="bottomlang">
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd<p><span>Available Languages: </span><a href="/en/mod/mod_include.html" title="English">&nbsp;en&nbsp;</a> |
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjung<a href="/ja/mod/mod_include.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a></p>
727872d18412fc021f03969b8641810d8896820bhumbedooh</div><div class="top"><a href="#page-header"><img src="/images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
0d0ba3a410038e179b695446bb149cce6264e0abnd<script type="text/javascript"><!--//--><![CDATA[//><!--
727872d18412fc021f03969b8641810d8896820bhumbedoohvar comments_shortname = 'httpd';
cc7e1025de9ac63bd4db6fe7f71c158b2cf09fe4humbedoohvar comments_identifier = 'http://httpd.apache.org/docs/trunk/mod/mod_include.html';
0d0ba3a410038e179b695446bb149cce6264e0abnd(function(w, d) {
cc7e1025de9ac63bd4db6fe7f71c158b2cf09fe4humbedooh if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
727872d18412fc021f03969b8641810d8896820bhumbedooh d.write('<div id="comments_thread"><\/div>');
0d0ba3a410038e179b695446bb149cce6264e0abnd var s = d.createElement('script');
0d0ba3a410038e179b695446bb149cce6264e0abnd s.type = 'text/javascript';
0d0ba3a410038e179b695446bb149cce6264e0abnd s.async = true;
ac082aefa89416cbdc9a1836eaf3bed9698201c8humbedooh s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
0d0ba3a410038e179b695446bb149cce6264e0abnd (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
0d0ba3a410038e179b695446bb149cce6264e0abnd }
0d0ba3a410038e179b695446bb149cce6264e0abnd else {
727872d18412fc021f03969b8641810d8896820bhumbedooh d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
0d0ba3a410038e179b695446bb149cce6264e0abnd }
0d0ba3a410038e179b695446bb149cce6264e0abnd})(window, document);
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedooh//--><!]]></script></div><div id="footer">
205f749042ed530040a4f0080dbcb47ceae8a374rjung<p class="apache">Copyright 2015 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
af33a4994ae2ff15bc67d19ff1a7feb906745bf8rbowen<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/quickreference.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
0d0ba3a410038e179b695446bb149cce6264e0abndif (typeof(prettyPrint) !== 'undefined') {
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd prettyPrint();
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd}
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd//--><!]]></script>
b686b6a420bde7f78c416b90be11db94cb789979nd</body></html>