diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-07 02:04:06 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-07 02:04:06 +0000 |
commit | 5dff2d61cc1c27747ee398e04d8e02843aabb1f8 (patch) | |
tree | a67c336b406c8227bac912beb74a1ad3cdc55100 /docs/manual/mod/mod_include.html | |
parent | Initial commit. (diff) | |
download | apache2-upstream.tar.xz apache2-upstream.zip |
Adding upstream version 2.4.38.upstream/2.4.38upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | docs/manual/mod/mod_include.html | 13 | ||||
-rw-r--r-- | docs/manual/mod/mod_include.html.en | 1148 | ||||
-rw-r--r-- | docs/manual/mod/mod_include.html.fr.utf8 | 1232 | ||||
-rw-r--r-- | docs/manual/mod/mod_include.html.ja.utf8 | 901 |
4 files changed, 3294 insertions, 0 deletions
diff --git a/docs/manual/mod/mod_include.html b/docs/manual/mod/mod_include.html new file mode 100644 index 0000000..12994c3 --- /dev/null +++ b/docs/manual/mod/mod_include.html @@ -0,0 +1,13 @@ +# GENERATED FROM XML -- DO NOT EDIT + +URI: mod_include.html.en +Content-Language: en +Content-type: text/html; charset=ISO-8859-1 + +URI: mod_include.html.fr.utf8 +Content-Language: fr +Content-type: text/html; charset=UTF-8 + +URI: mod_include.html.ja.utf8 +Content-Language: ja +Content-type: text/html; charset=UTF-8 diff --git a/docs/manual/mod/mod_include.html.en b/docs/manual/mod/mod_include.html.en new file mode 100644 index 0000000..768806e --- /dev/null +++ b/docs/manual/mod/mod_include.html.en @@ -0,0 +1,1148 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head> +<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" /> +<!-- + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + This file is generated from xml source: DO NOT EDIT + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + --> +<title>mod_include - Apache HTTP Server Version 2.4</title> +<link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /> +<link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /> +<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" /> +<script src="../style/scripts/prettify.min.js" type="text/javascript"> +</script> + +<link href="../images/favicon.ico" rel="shortcut icon" /></head> +<body> +<div id="page-header"> +<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.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> +<p class="apache">Apache HTTP Server Version 2.4</p> +<img alt="" src="../images/feather.png" /></div> +<div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div> +<div id="path"> +<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.4</a> > <a href="./">Modules</a></div> +<div id="page-content"> +<div id="preamble"><h1>Apache Module mod_include</h1> +<div class="toplang"> +<p><span>Available Languages: </span><a href="../en/mod/mod_include.html" title="English"> en </a> | +<a href="../fr/mod/mod_include.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="../ja/mod/mod_include.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a></p> +</div> +<table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Server-parsed html documents (Server Side Includes)</td></tr> +<tr><th><a href="module-dict.html#Status">Status:</a></th><td>Base</td></tr> +<tr><th><a href="module-dict.html#ModuleIdentifier">Module Identifier:</a></th><td>include_module</td></tr> +<tr><th><a href="module-dict.html#SourceFile">Source File:</a></th><td>mod_include.c</td></tr></table> +<h3>Summary</h3> + + <p>This module provides a filter which will process files + before they are sent to the client. The processing is + controlled by specially formatted SGML comments, referred to as + <dfn>elements</dfn>. These elements allow conditional text, the + inclusion of other files or programs, as well as the setting and + printing of environment variables.</p> +</div> +<div id="quickview"><a href="https://www.apache.org/foundation/contributing.html" class="badge"><img src="https://www.apache.org/images/SupportApache-small.png" alt="Support Apache!" /></a><h3>Topics</h3> +<ul id="topics"> +<li><img alt="" src="../images/down.gif" /> <a href="#enabling">Enabling Server-Side Includes</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#pathinfo">PATH_INFO with Server Side Includes</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#elements">Available Elements</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#includevars">Include Variables</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#substitution">Variable Substitution</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#flowctrl">Flow Control Elements</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#legacyexpr">Legacy expression syntax</a></li> +</ul><h3 class="directives">Directives</h3> +<ul id="toc"> +<li><img alt="" src="../images/down.gif" /> <a href="#ssiendtag">SSIEndTag</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ssierrormsg">SSIErrorMsg</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ssietag">SSIETag</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ssilastmodified">SSILastModified</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ssilegacyexprparser">SSILegacyExprParser</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ssistarttag">SSIStartTag</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ssitimeformat">SSITimeFormat</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ssiundefinedecho">SSIUndefinedEcho</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#xbithack">XBitHack</a></li> +</ul> +<h3>Bugfix checklist</h3><ul class="seealso"><li><a href="https://www.apache.org/dist/httpd/CHANGES_2.4">httpd changelog</a></li><li><a href="https://bz.apache.org/bugzilla/buglist.cgi?bug_status=__open__&list_id=144532&product=Apache%20httpd-2&query_format=specific&order=changeddate%20DESC%2Cpriority%2Cbug_severity&component=mod_include">Known issues</a></li><li><a href="https://bz.apache.org/bugzilla/enter_bug.cgi?product=Apache%20httpd-2&component=mod_include">Report a bug</a></li></ul><h3>See also</h3> +<ul class="seealso"> +<li><code class="directive"><a href="../mod/core.html#options">Options</a></code></li> +<li><code class="directive"><a href="../mod/core.html#acceptpathinfo">AcceptPathInfo</a></code></li> +<li><a href="../filter.html">Filters</a></li> +<li><a href="../howto/ssi.html">SSI Tutorial</a></li> +<li><a href="#comments_section">Comments</a></li></ul></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="section"> +<h2><a name="enabling" id="enabling">Enabling Server-Side Includes</a></h2> + + + <p>Server Side Includes are implemented by the + <code>INCLUDES</code> <a href="../filter.html">filter</a>. If + documents containing server-side include directives are given + the extension .shtml, the following directives will make Apache + parse them and assign the resulting document the mime type of + <code>text/html</code>:</p> + + <pre class="prettyprint lang-config">AddType text/html .shtml +AddOutputFilter INCLUDES .shtml</pre> + + + <p>The following directive must be given for the directories + containing the shtml files (typically in a + <code class="directive"><a href="../mod/core.html#directory"><Directory></a></code> section, + but this directive is also valid in <code>.htaccess</code> files if + <code class="directive"><a href="../mod/core.html#allowoverride">AllowOverride</a></code> <code>Options</code> + is set):</p> + + <pre class="prettyprint lang-config">Options +Includes</pre> + + + <p>For backwards compatibility, the <code>server-parsed</code> + <a href="../handler.html">handler</a> also activates the + INCLUDES filter. As well, Apache will activate the INCLUDES + filter for any document with mime type + <code>text/x-server-parsed-html</code> or + <code>text/x-server-parsed-html3</code> (and the resulting + output will have the mime type <code>text/html</code>).</p> + + <p>For more information, see our <a href="../howto/ssi.html">Tutorial on Server Side Includes</a>.</p> +</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="section"> +<h2><a name="pathinfo" id="pathinfo">PATH_INFO with Server Side Includes</a></h2> + + + <p>Files processed for server-side includes no longer accept + requests with <code>PATH_INFO</code> (trailing pathname information) + by default. You can use the <code class="directive"><a href="../mod/core.html#acceptpathinfo">AcceptPathInfo</a></code> directive to + configure the server to accept requests with <code>PATH_INFO</code>.</p> +</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="section"> +<h2><a name="elements" id="elements">Available Elements</a></h2> + <p>The document is parsed as an HTML document, with special + commands embedded as SGML comments. A command has the syntax: </p> + + <div class="example"><p><code> + <!--#<var>element</var> <var>attribute</var>=<var>value</var> + <var>attribute</var>=<var>value</var> ... --> + </code></p></div> + + <p>The value will often be enclosed in double quotes, but single + quotes (<code>'</code>) and backticks (<code>`</code>) are also + possible. Many commands only allow a single attribute-value pair. + Note that the comment terminator (<code>--></code>) should be + preceded by whitespace to ensure that it isn't considered part of + an SSI token. Note that the leading <code><!--#</code> is <em>one</em> + token and may not contain any whitespaces.</p> + + <p>The allowed elements are listed in the following table:</p> + + <table class="bordered"> + <tr><th>Element</th><th>Description</th></tr> + <tr><td><code><a href="#element.comment">comment</a></code></td> + <td>SSI comment</td></tr> + <tr><td><code><a href="#element.config">config</a></code></td> + <td>configure output formats</td></tr> + <tr><td><code><a href="#element.echo">echo</a></code></td> + <td>print variables</td></tr> + <tr><td><code><a href="#element.exec">exec</a></code></td> + <td>execute external programs</td></tr> + <tr><td><code><a href="#element.fsize">fsize</a></code></td> + <td>print size of a file</td></tr> + <tr><td><code><a href="#element.flastmod">flastmod</a></code></td> + <td>print last modification time of a file</td></tr> + <tr><td><code><a href="#element.include">include</a></code></td> + <td>include a file</td></tr> + <tr><td><code><a href="#element.printenv">printenv</a></code></td> + <td>print all available variables</td></tr> + <tr><td><code><a href="#element.set">set</a></code></td> + <td>set a value of a variable</td></tr> + </table> + + <p>SSI elements may be defined by modules other than + <code class="module"><a href="../mod/mod_include.html">mod_include</a></code>. In fact, the <code><a href="#element.exec">exec</a></code> element is provided by + <code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code>, and will only be available if this + module is loaded.</p> + + <h3><a name="element.comment" id="element.comment">The comment Element</a></h3> + <p>This command doesn't output anything. Its only use is to + add comments within a file. These comments are not printed.</p> + + <p>This syntax is available in version 2.4.21 and later.</p> + + <div class="example"><p><code> + <!--#comment Blah Blah Blah --> + </code></p></div> + + + <h3><a name="element.config" id="element.config">The config Element</a></h3> + <p>This command controls various aspects of the parsing. The + valid attributes are:</p> + + <dl> + <dt><code>echomsg</code> (<em>Apache 2.1 and later</em>)</dt> + <dd><p>The value is a message that is sent back to the + client if the <code><a href="#element.echo">echo</a></code> element + attempts to echo an undefined variable. This overrides any <code class="directive"><a href="#ssiundefinedecho">SSIUndefinedEcho</a></code> directives.</p> + + <div class="example"><p><code> + <!--#config echomsg="[Value Undefined]" --> + </code></p></div> + </dd> + + <dt><code>errmsg</code></dt> + <dd><p>The value is a message that is sent back to the + client if an error occurs while parsing the + document. This overrides any <code class="directive"><a href="#ssierrormsg">SSIErrorMsg</a></code> directives.</p> + + <div class="example"><p><code> + <!--#config errmsg="[Oops, something broke.]" --> + </code></p></div> + </dd> + + <dt><code>sizefmt</code></dt> + <dd><p>The value sets the format to be used when displaying + the size of a file. Valid values are <code>bytes</code> + for a count in bytes, or <code>abbrev</code> for a count + in Kb or Mb as appropriate, for example a size of 1024 bytes + will be printed as "1K".</p> + + <div class="example"><p><code> + <!--#config sizefmt="abbrev" --> + </code></p></div> + + </dd> + + <dt><code>timefmt</code></dt> + <dd><p>The value is a string to be used by the + <code>strftime(3)</code> library routine when printing + dates.</p> + + <div class="example"><p><code> + <!--#config timefmt=""%R, %B %d, %Y"" --> + </code></p></div> + + </dd> + </dl> + + + <h3><a name="element.echo" id="element.echo">The echo Element</a></h3> + <p>This command prints one of the <a href="#includevars">include + variables</a> defined below. If the variable is unset, the result is + determined by the <code class="directive"><a href="#ssiundefinedecho">SSIUndefinedEcho</a></code> directive. Any dates printed are + subject to the currently configured <code>timefmt</code>.</p> + + <p>Attributes:</p> + + <dl> + <dt><code>var</code></dt> + <dd>The value is the name of the variable to print.</dd> + + <dt><code>decoding</code></dt> + <dd><p>Specifies whether Apache should strip an encoding from + the variable before processing the variable further. The default + is <code>none</code>, where no decoding will be done. If set to + <code>url</code>, then URL decoding (also known as %-encoding; + this is appropriate for use within URLs in links, etc.) will be + performed. If set to <code>urlencoded</code>, + application/x-www-form-urlencoded compatible encoding (found in + query strings) will be stripped. If set to <code>base64</code>, + base64 will be decoded, and if set to <code>entity</code>, HTML + entity encoding will be stripped. Decoding is done prior to any + further encoding on the variable. Multiple encodings can be + stripped by specifying more than one comma separated encoding. + The decoding setting will remain in effect until the next decoding + attribute is encountered, or the element ends.</p> + + <p>The <code>decoding</code> attribute must <em>precede</em> the + corresponding <code>var</code> attribute to be effective.</p> + </dd> + + <dt><code>encoding</code></dt> + <dd><p>Specifies how Apache should encode special characters + contained in the variable before outputting them. If set + to <code>none</code>, no encoding will be done. If set to + <code>url</code>, then URL encoding (also known as %-encoding; + this is appropriate for use within URLs in links, etc.) will be + performed. If set to <code>urlencoded</code>, + application/x-www-form-urlencoded compatible encoding will be + performed instead, and should be used with query strings. If set + to <code>base64</code>, base64 encoding will be performed. At + the start of an <code>echo</code> element, the default is set to + <code>entity</code>, resulting in entity encoding (which is + appropriate in the context of a block-level HTML element, + <em>e.g.</em> a paragraph of text). This can be changed by adding + an <code>encoding</code> attribute, which will remain in effect + until the next <code>encoding</code> attribute is encountered or + the element ends, whichever comes first.</p> + + <p>The <code>encoding</code> attribute must <em>precede</em> the + corresponding <code>var</code> attribute to be effective.</p> + + <div class="warning"> + In order to avoid cross-site scripting issues, you should + <em>always</em> encode user supplied data. + </div> + + <div class="example"><h3>Example</h3><p><code> + <!--#echo encoding="entity" var="QUERY_STRING" --> + </code></p></div> + </dd> + </dl> + + + <h3><a name="element.exec" id="element.exec">The exec Element</a></h3> + <p>The <code>exec</code> command executes a given shell command or + CGI script. It requires <code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code> to be present + in the server. If <code class="directive"><a href="../mod/core.html#options">Options</a></code> + <code>IncludesNOEXEC</code> is set, this command is completely + disabled. The valid attributes are:</p> + + <dl> + <dt><code>cgi</code></dt> + <dd><p>The value specifies a (%-encoded) URL-path to + the CGI script. If the path does not begin with a slash (/), + then it is taken to be relative to the current + document. The document referenced by this path is + invoked as a CGI script, even if the server would not + normally recognize it as such. However, the directory + containing the script must be enabled for CGI scripts + (with <code class="directive"><a href="../mod/mod_alias.html#scriptalias">ScriptAlias</a></code> + or <code class="directive"><a href="../mod/core.html#options">Options</a></code> + <code>ExecCGI</code>).</p> + + <p>The CGI script is given the <code>PATH_INFO</code> and query + string (<code>QUERY_STRING</code>) of the original request from the + client; these <em>cannot</em> be specified in the URL path. The + include variables will be available to the script in addition to + the standard <a href="mod_cgi.html">CGI</a> environment.</p> + + <div class="example"><h3>Example</h3><p><code> + <!--#exec cgi="/cgi-bin/example.cgi" --> + </code></p></div> + + <p>If the script returns a <code>Location:</code> header instead of + output, then this will be translated into an HTML anchor.</p> + + <p>The <code><a href="#includevirtual">include virtual</a></code> + element should be used in preference to <code>exec cgi</code>. In + particular, if you need to pass additional arguments to a CGI program, + using the query string, this cannot be done with <code>exec + cgi</code>, but can be done with <code>include virtual</code>, as + shown here:</p> + + <div class="example"><p><code> + <!--#include virtual="/cgi-bin/example.cgi?argument=value" --> + </code></p></div> + </dd> + + <dt><code>cmd</code></dt> + <dd><p>The server will execute the given string using + <code>/bin/sh</code>. The <a href="#includevars">include variables</a> are available to the command, in addition + to the usual set of CGI variables.</p> + + <p>The use of <code><a href="#includevirtual">#include virtual</a></code> is almost always prefered to using + either <code>#exec cgi</code> or <code>#exec cmd</code>. The former + (<code>#include virtual</code>) uses the standard Apache sub-request + mechanism to include files or scripts. It is much better tested and + maintained.</p> + + <p>In addition, on some platforms, like Win32, and on unix when + using <a href="../suexec.html">suexec</a>, you cannot pass arguments + to a command in an <code>exec</code> directive, or otherwise include + spaces in the command. Thus, while the following will work under a + non-suexec configuration on unix, it will not produce the desired + result under Win32, or when running suexec:</p> + + <div class="example"><p><code> + <!--#exec cmd="perl /path/to/perlscript arg1 arg2" --> + </code></p></div> + </dd> + </dl> + + + <h3><a name="element.fsize" id="element.fsize">The fsize Element</a></h3> + <p>This command prints the size of the specified file, subject + to the <code>sizefmt</code> format specification. Attributes:</p> + + <dl> + <dt><code>file</code></dt> + <dd>The value is a path relative to the directory + containing the current document being parsed. + + <div class="example"><p><code> + This file is <!--#fsize file="mod_include.html" --> bytes. + </code></p></div> + + The value of <code>file</code> cannot start with a slash + (<code>/</code>), nor can it contain <code>../</code> so as to + refer to a file above the current directory or outside of the + document root. Attempting to so will result in the error message: + <code>The given path was above the root path</code>. + </dd> + + <dt><code>virtual</code></dt> + <dd>The value is a (%-encoded) URL-path. If it does not begin with + a slash (/) then it is taken to be relative to the current document. + Note, that this does <em>not</em> print the size of any CGI output, + but the size of the CGI script itself.</dd> + </dl> + + <div class="example"><p><code> + This file is <!--#fsize virtual="/docs/mod/mod_include.html" --> bytes. + </code></p></div> + + <p>Note that in many cases these two are exactly the same thing. + However, the <code>file</code> attribute doesn't respect URL-space + aliases.</p> + + + <h3><a name="element.flastmod" id="element.flastmod">The flastmod Element</a></h3> + <p>This command prints the last modification date of the + specified file, subject to the <code>timefmt</code> format + specification. The attributes are the same as for the + <code><a href="#element.fsize">fsize</a></code> command.</p> + + + <h3><a name="element.include" id="element.include">The include Element</a></h3> + <p>This command inserts the text of another document or file + into the parsed file. Any included file is subject to the usual + access control. If the directory containing the parsed file has + <a href="core.html#options">Options</a> + <code>IncludesNOEXEC</code> set, then only documents with a text + <a class="glossarylink" href="../glossary.html#mime-type" title="see glossary">MIME-type</a> (<code>text/plain</code>, + <code>text/html</code> etc.) will be included. Otherwise CGI + scripts are invoked as normal using the complete URL given in + the command, including any query string.</p> + + <p>An attribute defines the location of the document, and may + appear more than once in an include element; an inclusion is + done for each attribute given to the include command in turn. + The valid attributes are:</p> + + <dl> + <dt><code>file</code></dt> + <dd>The value is a path relative to the directory + containing the current document being parsed. It cannot + contain <code>../</code>, nor can it be an absolute path. + Therefore, you cannot include files that are outside of the + document root, or above the current document in the directory + structure. The <code>virtual</code> attribute should always be + used in preference to this one.</dd> + + <dt><code><a id="includevirtual" name="includevirtual">virtual</a></code></dt> + <dd><p>The value is a (%-encoded) URL-path. The URL cannot contain a + scheme or hostname, only a path and an optional query string. If it + does not begin with a slash (/) then it is taken to be relative to the + current document.</p> + + <p>A URL is constructed from the attribute, and the output the + server would return if the URL were accessed by the client is + included in the parsed output. Thus included files can be nested.</p> + + <p>If the specified URL is a CGI program, the program will be + executed and its output inserted in place of the directive in the + parsed file. You may include a query string in a CGI url:</p> + + <div class="example"><p><code> + <!--#include virtual="/cgi-bin/example.cgi?argument=value" --> + </code></p></div> + + <p><code>include virtual</code> should be used in preference + to <code>exec cgi</code> to include the output of CGI programs + into an HTML document.</p> + + <p>If the <code class="directive"><a href="../mod/mod_request.html#keptbodysize">KeptBodySize</a></code> + directive is correctly configured and valid for this included + file, attempts to POST requests to the enclosing HTML document + will be passed through to subrequests as POST requests as well. + Without the directive, all subrequests are processed as GET + requests.</p> + + </dd> + + <dt><code>onerror</code></dt> + <dd><p>The value is a (%-encoded) URL-path which is shown should a + previous attempt to include a file or virtual attribute failed. + To be effective, this attribute must be specified after the + file or virtual attributes being covered. If the attempt to + include the onerror path fails, or if onerror is not specified, the + default error message will be included.</p> + + <div class="example"><p><code> + # Simple example<br /> + <!--#include virtual="/not-exist.html" onerror="/error.html" --> + </code></p></div> + + <div class="example"><p><code> + # Dedicated onerror paths<br /> + <!--#include virtual="/path-a.html" onerror="/error-a.html" virtual="/path-b.html" onerror="/error-b.html" --> + </code></p></div> + + </dd> + </dl> + + + <h3><a name="element.printenv" id="element.printenv">The printenv Element</a></h3> + <p>This prints out a plain text listing of all existing variables and + their values. Special characters are entity encoded (see the <code><a href="#element.echo">echo</a></code> element for details) + before being output. There are no attributes.</p> + + <div class="example"><h3>Example</h3><p><code> + <pre> + <!--#printenv --> + </pre> + </code></p></div> + + + <h3><a name="element.set" id="element.set">The set Element</a></h3> + <p>This sets the value of a variable. Attributes:</p> + + <dl> + <dt><code>var</code></dt> + <dd>The name of the variable to set.</dd> + + <dt><code>value</code></dt> + <dd>The value to give a variable.</dd> + + <dt><code>decoding</code></dt> + <dd><p>Specifies whether Apache should strip an encoding from + the variable before processing the variable further. The default + is <code>none</code>, where no decoding will be done. If set to + <code>url</code>, <code>urlencoded</code>, <code>base64</code> + or <code>entity</code>, URL decoding, + application/x-www-form-urlencoded decoding, base64 decoding or HTML + entity decoding will be performed respectively. More than one + decoding can be specified by separating with commas. The decoding + setting will remain in effect until the next decoding attribute + is encountered, or the element ends. The <code>decoding</code> + attribute must <em>precede</em> the corresponding + <code>var</code> attribute to be effective.</p> + </dd> + + <dt><code>encoding</code></dt> + <dd><p>Specifies how Apache should encode special characters + contained in the variable before setting them. The default is + <code>none</code>, where no encoding will be done. If set to + <code>url</code>, <code>urlencoding</code>, <code>base64</code> + or <code>entity</code>, URL encoding, + application/x-www-form-urlencoded encoding, base64 encoding or + HTML entity encoding will be performed respectively. More than + one encoding can be specified by separating with commas. The + encoding setting will remain in effect until the next encoding + attribute is encountered, or the element ends. The + <code>encoding</code> attribute must <em>precede</em> the + corresponding <code>var</code> attribute to be effective. + Encodings are applied after all decodings have been + stripped.</p> + </dd> + </dl> + + <div class="example"><h3>Example</h3><p><code> + <!--#set var="category" value="help" --> + </code></p></div> + +</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="section"> +<h2><a name="includevars" id="includevars">Include Variables</a></h2> + + + <p>In addition to the variables in the standard CGI environment, + these are available for the <code>echo</code> command, for + <code>if</code> and <code>elif</code>, and to any program + invoked by the document.</p> + + <dl> + <dt><code>DATE_GMT</code></dt> + <dd>The current date in Greenwich Mean Time.</dd> + + <dt><code>DATE_LOCAL</code></dt> + <dd>The current date in the local time zone.</dd> + + <dt><code>DOCUMENT_ARGS</code></dt> + <dd>This variable contains the query string of the active SSI + document, or the empty string if a query string is not + included. For subrequests invoked through the + <code>include</code> SSI directive, <code>QUERY_STRING</code> + will represent the query string of the subrequest and + <code>DOCUMENT_ARGS</code> will represent the query string of + the SSI document. (Available in Apache HTTP Server 2.4.19 and + later.)</dd> + + <dt><code>DOCUMENT_NAME</code></dt> + <dd>The filename (excluding directories) of the document + requested by the user.</dd> + + <dt><code>DOCUMENT_PATH_INFO</code></dt> + <dd>The trailing pathname information. See directive <code class="directive"><a href="../mod/core.html#acceptpathinfo">AcceptPathInfo</a></code> for more information + about <code>PATH_INFO</code>.</dd> + + <dt><code>DOCUMENT_URI</code></dt> + <dd>The (%-decoded) URL path of the document requested by the + user. Note that in the case of nested include files, this is + <em>not</em> the URL for the current document. Note also that + 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 + URL is shown.</dd> + + <dt><code>LAST_MODIFIED</code></dt> + <dd>The last modification date of the document requested by + the user.</dd> + + <dt><code>QUERY_STRING_UNESCAPED</code></dt> + <dd>If a query string is present in the request for the active + SSI document, this variable contains the (%-decoded) query + string, which is <em>escaped</em> for shell usage (special + characters like <code>&</code> etc. are preceded by + backslashes). It is not set if a query string is not + present. Use <code>DOCUMENT_ARGS</code> if shell escaping + is not desired.</dd> + + <dt><code>USER_NAME</code></dt> + <dd>The user name of the owner of the file.</dd> + </dl> +</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="section"> +<h2><a name="substitution" id="substitution">Variable Substitution</a></h2> + + <p>Variable substitution is done within quoted strings in most + cases where they may reasonably occur as an argument to an SSI + directive. This includes the <code>config</code>, + <code>exec</code>, <code>flastmod</code>, <code>fsize</code>, + <code>include</code>, <code>echo</code>, and <code>set</code> + directives. If <code class="directive"><a href="#ssilegacyexprparser">SSILegacyExprParser</a></code> is set to <code>on</code>, + substitution also occurs in the arguments to conditional operators. + You can insert a literal dollar sign into the string using backslash + quoting:</p> + + <div class="example"><p><code> + <!--#set var="cur" value="\$test" --> + </code></p></div> + + <p>If a variable reference needs to be substituted in the + middle of a character sequence that might otherwise be + considered a valid identifier in its own right, it can be + disambiguated by enclosing the reference in braces, + <em>a la</em> shell substitution:</p> + + <div class="example"><p><code> + <!--#set var="Zed" value="${REMOTE_HOST}_${REQUEST_METHOD}" --> + </code></p></div> + + <p>This will result in the <code>Zed</code> variable being set + to "<code>X_Y</code>" if <code>REMOTE_HOST</code> is + "<code>X</code>" and <code>REQUEST_METHOD</code> is + "<code>Y</code>".</p> +</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="section"> +<h2><a name="flowctrl" id="flowctrl">Flow Control Elements</a></h2> + + + <p>The basic flow control elements are:</p> + + <div class="example"><p><code> + <!--#if expr="<var>test_condition</var>" --><br /> + <!--#elif expr="<var>test_condition</var>" --><br /> + <!--#else --><br /> + <!--#endif --> + </code></p></div> + + <p>The <code>if</code> element works like an if statement in a + programming language. The test condition is evaluated and if + the result is true, then the text until the next <code>elif</code>, + <code>else</code> or <code>endif</code> element is included in the + output stream.</p> + + <p>The <code>elif</code> or <code>else</code> statements are used + to put text into the output stream if the original + <var>test_condition</var> was false. These elements are optional.</p> + + <p>The <code>endif</code> element ends the <code>if</code> element + and is required.</p> + + <p><var>test_condition</var> is a boolean expression which follows the + <a href="../expr.html">ap_expr</a> syntax. The syntax can be changed + to be compatible with Apache HTTPD 2.2.x using <code class="directive"><a href="#ssilegacyexprparser">SSILegacyExprParser</a></code>.</p> + + <p>The SSI variables set with the <code>var</code> element are exported + into the request environment and can be accessed with the + <code>reqenv</code> function. As a short-cut, the function name + <code>v</code> is also available inside <code class="module"><a href="../mod/mod_include.html">mod_include</a></code>.</p> + + <p>The below example will print "from local net" if client IP address + belongs to the 10.0.0.0/8 subnet.</p> + + <div class="example"><p><code> + <!--#if expr='-R "10.0.0.0/8"' --><br /> + <span class="indent"> + from local net<br /> + </span> + <!--#else --><br /> + <span class="indent"> + from somewhere else<br /> + </span> + <!--#endif --> + </code></p></div> + + <p>The below example will print "foo is bar" if the variable + <code>foo</code> is set to the value "bar".</p> + + <div class="example"><p><code> + <!--#if expr='v("foo") = "bar"' --><br /> + <span class="indent"> + foo is bar<br /> + </span> + <!--#endif --> + </code></p></div> + + <div class="note"><h3>Reference Documentation</h3> + <p>See also: <a href="../expr.html">Expressions in Apache HTTP Server</a>, + for a complete reference and examples. The <em>restricted</em> functions + are not available inside <code class="module"><a href="../mod/mod_include.html">mod_include</a></code></p> + </div> +</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="section"> +<h2><a name="legacyexpr" id="legacyexpr">Legacy expression syntax</a></h2> + + + <p>This section describes the syntax of the <code>#if expr</code> + element if <code class="directive"><a href="#ssilegacyexprparser">SSILegacyExprParser</a></code> + is set to <code>on</code>.</p> + + <dl> + <dt><code><var>string</var></code></dt> + <dd>true if <var>string</var> is not empty</dd> + + <dt><code><var>-A string</var></code></dt> + <dd><p>true if the URL represented by the string is accessible by + configuration, false otherwise. This is useful where content on a + page is to be hidden from users who are not authorized to view the + URL, such as a link to that URL. Note that the URL is only tested + for whether access would be granted, not whether the URL exists.</p> + + <div class="example"><h3>Example</h3><p><code> + <!--#if expr="-A /private" --><br /> + <span class="indent"> + Click <a href="/private">here</a> to access private + information.<br /> + </span> + <!--#endif --> + </code></p></div> + </dd> + + <dt><code><var>string1</var> = <var>string2</var><br /> + <var>string1</var> == <var>string2</var><br /> + <var>string1</var> != <var>string2</var></code></dt> + + <dd><p>Compare <var>string1</var> with <var>string2</var>. If + <var>string2</var> has the form <code>/<var>string2</var>/</code> + then it is treated as a regular expression. Regular expressions are + implemented by the <a href="http://www.pcre.org">PCRE</a> engine and + have the same syntax as those in <a href="http://www.perl.com">perl + 5</a>. Note that <code>==</code> is just an alias for <code>=</code> + and behaves exactly the same way.</p> + + <p>If you are matching positive (<code>=</code> or <code>==</code>), you + can capture grouped parts of the regular expression. The captured parts + are stored in the special variables <code>$1</code> .. + <code>$9</code>. The whole string matched by the regular expression is + stored in the special variable <code>$0</code></p> + + <div class="example"><h3>Example</h3><p><code> + <!--#if expr="$QUERY_STRING = /^sid=([a-zA-Z0-9]+)/" --><br /> + <span class="indent"> + <!--#set var="session" value="$1" --><br /> + </span> + <!--#endif --> + </code></p></div> + </dd> + + <dt><code><var>string1</var> < <var>string2</var><br /> + <var>string1</var> <= <var>string2</var><br /> + <var>string1</var> > <var>string2</var><br /> + <var>string1</var> >= <var>string2</var></code></dt> + + <dd>Compare <var>string1</var> with <var>string2</var>. Note, that + strings are compared <em>literally</em> (using + <code>strcmp(3)</code>). Therefore the string "100" is less than + "20".</dd> + + <dt><code>( <var>test_condition</var> )</code></dt> + <dd>true if <var>test_condition</var> is true</dd> + + <dt><code>! <var>test_condition</var></code></dt> + <dd>true if <var>test_condition</var> is false</dd> + + <dt><code><var>test_condition1</var> && + <var>test_condition2</var></code></dt> + <dd>true if both <var>test_condition1</var> and + <var>test_condition2</var> are true</dd> + + <dt><code><var>test_condition1</var> || + <var>test_condition2</var></code></dt> + <dd>true if either <var>test_condition1</var> or + <var>test_condition2</var> is true</dd> + </dl> + + <p>"<code>=</code>" and "<code>!=</code>" bind more tightly than + "<code>&&</code>" and "<code>||</code>". "<code>!</code>" binds + most tightly. Thus, the following are equivalent:</p> + + <div class="example"><p><code> + <!--#if expr="$a = test1 && $b = test2" --><br /> + <!--#if expr="($a = test1) && ($b = test2)" --> + </code></p></div> + + <p>The boolean operators <code>&&</code> and <code>||</code> + share the same priority. So if you want to bind such an operator more + tightly, you should use parentheses.</p> + + <p>Anything that's not recognized as a variable or an operator + is treated as a string. Strings can also be quoted: + <code>'string'</code>. Unquoted strings can't contain whitespace + (blanks and tabs) because it is used to separate tokens such as + variables. If multiple strings are found in a row, they are + concatenated using blanks. So,</p> + + <div class="example"><p><code><var>string1</var> <var>string2</var></code> results in <code><var>string1</var> <var>string2</var></code><br /> + <br /> + and<br /> + <br /> + <code>'<var>string1</var> <var>string2</var>'</code> results in <code><var>string1</var> <var>string2</var></code>.</p></div> + + <div class="note"><h3>Optimization of Boolean Expressions</h3> + <p>If the expressions become more complex and slow down processing + significantly, you can try to optimize them according to the + evaluation rules:</p> + <ul> + <li>Expressions are evaluated from left to right</li> + <li>Binary boolean operators (<code>&&</code> and <code>||</code>) + are short circuited wherever possible. In conclusion with the rule + above that means, <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> evaluates at first + the left expression. If the left result is sufficient to determine + the end result, processing stops here. Otherwise it evaluates the + right side and computes the end result from both left and right + results.</li> + <li>Short circuit evaluation is turned off as long as there are regular + expressions to deal with. These must be evaluated to fill in the + backreference variables (<code>$1</code> .. <code>$9</code>).</li> + </ul> + <p>If you want to look how a particular expression is handled, you can + recompile <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> using the + <code>-DDEBUG_INCLUDE</code> compiler option. This inserts for every + parsed expression tokenizer information, the parse tree and how it is + evaluated into the output sent to the client.</p> + </div> + + <div class="note"><h3>Escaping slashes in regex strings</h3> + <p>All slashes which are not intended to act as delimiters in your regex must + be escaped. This is regardless of their meaning to the regex engine.</p> + </div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="SSIEndTag" id="SSIEndTag">SSIEndTag</a> <a name="ssiendtag" id="ssiendtag">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>String that ends an include element</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSIEndTag <var>tag</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSIEndTag "-->"</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_include</td></tr> +</table> + <p>This directive changes the string that <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> + looks for to mark the end of an include element.</p> + + <pre class="prettyprint lang-config">SSIEndTag "%>"</pre> + + + +<h3>See also</h3> +<ul> +<li><code class="directive"><a href="#ssistarttag">SSIStartTag</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="SSIErrorMsg" id="SSIErrorMsg">SSIErrorMsg</a> <a name="ssierrormsg" id="ssierrormsg">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Error message displayed when there is an SSI +error</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSIErrorMsg <var>message</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSIErrorMsg "[an error occurred while processing this +directive]"</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_include</td></tr> +</table> + <p>The <code class="directive">SSIErrorMsg</code> directive changes the error + message displayed when <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> encounters an + error. For production servers you may consider changing the default + error message to <code>"<!-- Error -->"</code> so that + the message is not presented to the user.</p> + + <p>This directive has the same effect as the <code><!--#config + errmsg=<var>message</var> --></code> element.</p> + + <pre class="prettyprint lang-config">SSIErrorMsg "<!-- Error -->"</pre> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="SSIETag" id="SSIETag">SSIETag</a> <a name="ssietag" id="ssietag">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Controls whether ETags are generated by the server.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSIETag on|off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSIETag off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_include</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in version 2.2.15 and later.</td></tr> +</table> + <p>Under normal circumstances, a file filtered by <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> + may contain elements that are either dynamically generated, or that may + have changed independently of the original file. As a result, by default + the server is asked not to generate an <code>ETag</code> header for the + response by adding <code>no-etag</code> to the request notes.</p> + + <p>The <code class="directive">SSIETag</code> directive suppresses this + behaviour, and allows the server to generate an <code>ETag</code> header. + This can be used to enable caching of the output. Note that a backend server + or dynamic content generator may generate an ETag of its own, ignoring + <code>no-etag</code>, and this ETag will be passed by + <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> regardless of the value of this setting. + <code class="directive">SSIETag</code> can take on the following values:</p> + + <dl> + + <dt><code>off</code></dt> + <dd><code>no-etag</code> will be added to the request notes, and the server + is asked not to generate an ETag. Where a server ignores the value of + <code>no-etag</code> and generates an ETag anyway, the ETag will be + respected.</dd> + + <dt><code>on</code></dt> + <dd>Existing ETags will be respected, and ETags generated by the server will + be passed on in the response.</dd> + + </dl> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="SSILastModified" id="SSILastModified">SSILastModified</a> <a name="ssilastmodified" id="ssilastmodified">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Controls whether <code>Last-Modified</code> headers are generated by the +server.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSILastModified on|off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSILastModified off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_include</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in version 2.2.15 and later.</td></tr> +</table> + <p>Under normal circumstances, a file filtered by <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> + may contain elements that are either dynamically generated, or that may + have changed independently of the original file. As a result, by default + the <code>Last-Modified</code> header is stripped from the response.</p> + + <p>The <code class="directive">SSILastModified</code> directive overrides this + behaviour, and allows the <code>Last-Modified</code> header to be respected + if already present, or set if the header is not already present. This can + be used to enable caching of the output. <code class="directive">SSILastModified</code> + can take on the following values:</p> + + <dl> + + <dt><code>off</code></dt> + <dd>The <code>Last-Modified</code> header will be stripped from responses, + unless the <code class="directive"><a href="#xbithack">XBitHack</a></code> directive + is set to <code>full</code> as described below.</dd> + + <dt><code>on</code></dt> + <dd>The <code>Last-Modified</code> header will be respected if already + present in a response, and added to the response if the response is a + file and the header is missing. The + <code class="directive"><a href="#ssilastmodified">SSILastModified</a></code> directive + takes precedence over <code class="directive"><a href="#xbithack">XBitHack</a></code>.</dd> + + </dl> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="SSILegacyExprParser" id="SSILegacyExprParser">SSILegacyExprParser</a> <a name="ssilegacyexprparser" id="ssilegacyexprparser">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enable compatibility mode for conditional expressions.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSILegacyExprParser on|off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSILegacyExprParser off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_include</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in version 2.3.13 and later.</td></tr> +</table> + <p>As of version 2.3.13, <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> has switched to the + new <a href="../expr.html">ap_expr</a> syntax for conditional expressions + in <code>#if</code> flow control elements. This directive allows to + switch to the <a href="#legacyexpr">old syntax</a> which is compatible + with Apache HTTPD version 2.2.x and earlier. + </p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="SSIStartTag" id="SSIStartTag">SSIStartTag</a> <a name="ssistarttag" id="ssistarttag">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>String that starts an include element</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSIStartTag <var>tag</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSIStartTag "<!--#"</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_include</td></tr> +</table> + <p>This directive changes the string that <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> + looks for to mark an include element to process.</p> + + <p>You may want to use this option if you have 2 servers parsing the + output of a file each processing different commands (possibly at + different times).</p> + + <pre class="prettyprint lang-config">SSIStartTag "<%" +SSIEndTag "%>"</pre> + + + <p>The example given above, which also specifies a matching + <code class="directive"><a href="#ssiendtag">SSIEndTag</a></code>, will + allow you to use SSI directives as shown in the example + below:</p> + + <div class="example"><h3>SSI directives with alternate start and end tags</h3><p><code> + <%printenv %> + </code></p></div> + +<h3>See also</h3> +<ul> +<li><code class="directive"><a href="#ssiendtag">SSIEndTag</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="SSITimeFormat" id="SSITimeFormat">SSITimeFormat</a> <a name="ssitimeformat" id="ssitimeformat">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures the format in which date strings are +displayed</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSITimeFormat <var>formatstring</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSITimeFormat "%A, %d-%b-%Y %H:%M:%S %Z"</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_include</td></tr> +</table> +<p>This directive changes the format in which date strings are displayed + when echoing <code>DATE</code> environment variables. The + <var>formatstring</var> is as in <code>strftime(3)</code> from the + C standard library.</p> + + <p>This directive has the same effect as the <code><!--#config + timefmt=<var>formatstring</var> --></code> element.</p> + + <pre class="prettyprint lang-config">SSITimeFormat "%R, %B %d, %Y"</pre> + + + <p>The above directive would cause times to be displayed in the + format "22:26, June 14, 2002".</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="SSIUndefinedEcho" id="SSIUndefinedEcho">SSIUndefinedEcho</a> <a name="ssiundefinedecho" id="ssiundefinedecho">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>String displayed when an unset variable is echoed</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSIUndefinedEcho <var>string</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSIUndefinedEcho "(none)"</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_include</td></tr> +</table> + <p>This directive changes the string that <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> + displays when a variable is not set and "echoed".</p> + + <pre class="prettyprint lang-config">SSIUndefinedEcho "<!-- undef -->"</pre> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="XBitHack" id="XBitHack">XBitHack</a> <a name="xbithack" id="xbithack">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Parse SSI directives in files with the execute bit +set</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>XBitHack on|off|full</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>XBitHack off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Options</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_include</td></tr> +</table> + <p>The <code class="directive">XBitHack</code> directive controls the parsing + of ordinary html documents. This directive only affects files associated + 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> + + <dl> + <dt><code>off</code></dt> + <dd>No special treatment of executable files.</dd> + + <dt><code>on</code></dt> + <dd>Any <code>text/html</code> file that has the user-execute bit + set will be treated as a server-parsed html document.</dd> + + <dt><code>full</code></dt> + <dd>As for <code>on</code> but also test the group-execute bit. + If it is set, then set the <code>Last-modified</code> date of the + returned file to be the last modified time of the file. If + it is not set, then no last-modified date is sent. Setting + this bit allows clients and proxies to cache the result of + the request. + + <div class="note"><h3>Note</h3> + <p>You would not want to use the full option, unless you assure the + group-execute bit is unset for every SSI script which might <code>#include</code> a CGI or otherwise produces different output on + each hit (or could potentially change on subsequent requests).</p> + + <p>The <code class="directive"><a href="#ssilastmodified">SSILastModified</a></code> + directive takes precedence over the + <code class="directive"><a href="#xbithack">XBitHack</a></code> directive when + <code class="directive"><a href="#ssilastmodified">SSILastModified</a></code> is set to + <code>on</code>.</p> + </div> + + </dd> + </dl> + + +</div> +</div> +<div class="bottomlang"> +<p><span>Available Languages: </span><a href="../en/mod/mod_include.html" title="English"> en </a> | +<a href="../fr/mod/mod_include.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="../ja/mod/mod_include.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a></p> +</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&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> +<script type="text/javascript"><!--//--><![CDATA[//><!-- +var comments_shortname = 'httpd'; +var comments_identifier = 'http://httpd.apache.org/docs/2.4/mod/mod_include.html'; +(function(w, d) { + if (w.location.hostname.toLowerCase() == "httpd.apache.org") { + d.write('<div id="comments_thread"><\/div>'); + var s = d.createElement('script'); + s.type = 'text/javascript'; + s.async = true; + s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier; + (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s); + } + else { + d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>'); + } +})(window, document); +//--><!]]></script></div><div id="footer"> +<p class="apache">Copyright 2019 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> +<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.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[//><!-- +if (typeof(prettyPrint) !== 'undefined') { + prettyPrint(); +} +//--><!]]></script> +</body></html>
\ No newline at end of file diff --git a/docs/manual/mod/mod_include.html.fr.utf8 b/docs/manual/mod/mod_include.html.fr.utf8 new file mode 100644 index 0000000..fd27c9e --- /dev/null +++ b/docs/manual/mod/mod_include.html.fr.utf8 @@ -0,0 +1,1232 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr"><head> +<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> +<!-- + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + This file is generated from xml source: DO NOT EDIT + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + --> +<title>mod_include - Serveur HTTP Apache Version 2.4</title> +<link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /> +<link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /> +<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" /> +<script src="../style/scripts/prettify.min.js" type="text/javascript"> +</script> + +<link href="../images/favicon.ico" rel="shortcut icon" /></head> +<body> +<div id="page-header"> +<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossaire</a> | <a href="../sitemap.html">Plan du site</a></p> +<p class="apache">Serveur HTTP Apache Version 2.4</p> +<img alt="" src="../images/feather.png" /></div> +<div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div> +<div id="path"> +<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">Serveur HTTP</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.4</a> > <a href="./">Modules</a></div> +<div id="page-content"> +<div id="preamble"><h1>Module Apache mod_include</h1> +<div class="toplang"> +<p><span>Langues Disponibles: </span><a href="../en/mod/mod_include.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="../fr/mod/mod_include.html" title="Français"> fr </a> | +<a href="../ja/mod/mod_include.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a></p> +</div> +<table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Documents html interprétés par le serveur (Server Side +Includes ou SSI)</td></tr> +<tr><th><a href="module-dict.html#Status">Statut:</a></th><td>Base</td></tr> +<tr><th><a href="module-dict.html#ModuleIdentifier">Identificateur de Module:</a></th><td>include_module</td></tr> +<tr><th><a href="module-dict.html#SourceFile">Fichier Source:</a></th><td>mod_include.c</td></tr></table> +<h3>Sommaire</h3> + + <p>Ce module fournit un filtre qui va traiter les fichiers avant + de les envoyer au client. Le traitement est contrôlé via des + commentaires SGML spécialement formatés, aussi nommés + <dfn>éléments</dfn>. Ces éléments permettent l'insertion + conditionnelle de texte, l'inclusion d'autres fichiers ou + programmes, ainsi que la définition et l'affichage de variables + d'environnement.</p> +</div> +<div id="quickview"><a href="https://www.apache.org/foundation/contributing.html" class="badge"><img src="https://www.apache.org/images/SupportApache-small.png" alt="Support Apache!" /></a><h3>Sujets</h3> +<ul id="topics"> +<li><img alt="" src="../images/down.gif" /> <a href="#enabling">Activation des SSI</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#pathinfo">PATH_INFO et SSI</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#elements">Eléments disponibles</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#includevars">Variables include</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#substitution">Substitution de variable</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#flowctrl">Eléments de contrôle d'inclusion conditionnelle</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#legacyexpr">Syntaxe des expressions héritée</a></li> +</ul><h3 class="directives">Directives</h3> +<ul id="toc"> +<li><img alt="" src="../images/down.gif" /> <a href="#ssiendtag">SSIEndTag</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ssierrormsg">SSIErrorMsg</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ssietag">SSIETag</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ssilastmodified">SSILastModified</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ssilegacyexprparser">SSILegacyExprParser</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ssistarttag">SSIStartTag</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ssitimeformat">SSITimeFormat</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ssiundefinedecho">SSIUndefinedEcho</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#xbithack">XBitHack</a></li> +</ul> +<h3>Traitement des bugs</h3><ul class="seealso"><li><a href="https://www.apache.org/dist/httpd/CHANGES_2.4">Journal des modifications de httpd</a></li><li><a href="https://bz.apache.org/bugzilla/buglist.cgi?bug_status=__open__&list_id=144532&product=Apache%20httpd-2&query_format=specific&order=changeddate%20DESC%2Cpriority%2Cbug_severity&component=mod_include">Problèmes connus</a></li><li><a href="https://bz.apache.org/bugzilla/enter_bug.cgi?product=Apache%20httpd-2&component=mod_include">Signaler un bug</a></li></ul><h3>Voir aussi</h3> +<ul class="seealso"> +<li><code class="directive"><a href="../mod/core.html#options">Options</a></code></li> +<li><code class="directive"><a href="../mod/core.html#acceptpathinfo">AcceptPathInfo</a></code></li> +<li><a href="../filter.html">Les filtres</a></li> +<li><a href="../howto/ssi.html">Tutoriel SSI</a></li> +<li><a href="#comments_section">Commentaires</a></li></ul></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="section"> +<h2><a name="enabling" id="enabling">Activation des SSI</a></h2> + + + <p>Les SSI sont implémentés par le <a href="../filter.html">filtre</a> <code>INCLUDES</code>. Si des + documents contenant des directives SSI possèdent une extension + .shtml, les directives suivantes indiqueront à Apache de les + interpréter et d'assigner le type MIME + <code>text/html</code> au document obtenu :</p> + + <pre class="prettyprint lang-config">AddType text/html .shtml +AddOutputFilter INCLUDES .shtml</pre> + + + <p>L'option suivante doit être définie pour les répertoires qui + contiennent les fichiers shtml (en général dans une section + <code class="directive"><a href="../mod/core.html#directory"><Directory></a></code>, mais + cette option peut également être définie dans un fichier + <code>.htaccess</code> si <code><code class="directive"><a href="../mod/core.html#allowoverride">AllowOverride</a></code> Options</code> a été défini pour le + répertoire considéré) :</p> + + <pre class="prettyprint lang-config">Options +Includes</pre> + + + <p>Pour des raisons de compatibilité ascendante, le <a href="../handler.html">gestionnaire</a> <code>server-parsed</code> + peut aussi activer le filtre INCLUDES. Ainsi, Apache va activer le + filtre INCLUDES pour tout document de type MIME + <code>text/x-server-parsed-html</code> ou + <code>text/x-server-parsed-html3</code> (et le document obtenu aura + pour type MIME <code>text/html</code>).</p> + + <p>Pour plus d'informations, voyez notre <a href="../howto/ssi.html">Tutoriel SSI</a>.</p> +</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="section"> +<h2><a name="pathinfo" id="pathinfo">PATH_INFO et SSI</a></h2> + + + <p>Les fichiers traités dans le cadre des SSI n'acceptent plus par + défaut les requêtes avec <code>PATH_INFO</code> (les informations + relatives au chemin en fin de requête). La directive <code class="directive"><a href="../mod/core.html#acceptpathinfo">AcceptPathInfo</a></code> permet de configurer le + serveur de façon à ce qu'il accepte ce genre de requête.</p> +</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="section"> +<h2><a name="elements" id="elements">Eléments disponibles</a></h2> + <p>Le document est interprété comme un document HTML, avec des + commandes spéciales incluses sous forme de commentaires SGML. La + syntaxe d'une commande est la suivante : </p> + + <div class="example"><p><code> + <!--#<var>élément</var> <var>attribut</var>=<var>valeur</var> + <var>attribut</var>=<var>valeur</var> ... --> + </code></p></div> + + <p>Les valeurs sont souvent entourées de guillemets, mais on peut + aussi utiliser des apostrophes (<code>'</code>) ou des apostrophes + inverses (<code>`</code>). De nombreuses commandes n'acceptent + qu'une seule paire attribut-valeur. Notez que le terminateur de + commentaire (<code>--></code>) doit être précédé d'un espace afin + d'être sûr qu'il ne soit pas considéré comme un élément de commande + SSI. Notez aussi que le délimiteur de début <code><!--#</code> + est <em>un</em> élément de commande et ne doit donc pas contenir + d'espace.</p> + + <p>La table suivante contient la liste des éléments autorisés :</p> + + <table class="bordered"> + <tr><th>Elément</th><th>Description</th></tr> + <tr><td><code><a href="#element.comment">comment</a></code></td> + <td>commentaire SSI</td></tr> + <tr><td><code><a href="#element.config">config</a></code></td> + <td>configure les formats de sortie</td></tr> + <tr><td><code><a href="#element.echo">echo</a></code></td> + <td>affiche le contenu de variables</td></tr> + <tr><td><code><a href="#element.exec">exec</a></code></td> + <td>exécute des programmes externes</td></tr> + <tr><td><code><a href="#element.fsize">fsize</a></code></td> + <td>affiche la taille d'un fichier</td></tr> + <tr><td><code><a href="#element.flastmod">flastmod</a></code></td> + <td>affiche la date de dernière modification d'un fichier</td></tr> + <tr><td><code><a href="#element.include">include</a></code></td> + <td>inclut un fichier</td></tr> + <tr><td><code><a href="#element.printenv">printenv</a></code></td> + <td>affiche toutes les variables disponibles</td></tr> + <tr><td><code><a href="#element.set">set</a></code></td> + <td>définit la valeur d'une variable</td></tr> + </table> + + <p>Les éléments SSI peuvent être définis par d'autres modules que + <code class="module"><a href="../mod/mod_include.html">mod_include</a></code>. À ce titre, l'élément <code><a href="#element.exec">exec</a></code> est fourni par + <code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code>, et ne sera disponible que si ce module est + chargé.</p> + + <h3><a name="element.comment" id="element.comment">L'élément comment</a></h3> + <p>Cette commande n'affiche aucune information. Elle n'a pour but que + l'ajout de commentaires dans un fichier et ces commentaires ne sont pas + affichés.</p> + + <p>Cette syntaxe est disponible à partir de la version 2.4.21 du serveur + HTTP Apache.</p> + + <div class="example"><p><code> + <!--#comment Blah Blah Blah --> + </code></p></div> + + + <h3><a name="element.config" id="element.config">L'élément config</a></h3> + <p>Cette commande contrôle divers aspects de l'interprétation. Les + attributs valides sont :</p> + + <dl> + <dt><code>echomsg</code> (<em>Versions 2.1 et supérieures + d'Apache</em>)</dt> + <dd><p>La valeur est un message qui sera envoyé au client si + l'élément <code><a href="#element.echo">echo</a></code> tente + d'afficher le contenu d'une variable non définie. Cet attribut + l'emporte sur toute directive <code class="directive"><a href="#ssiundefinedecho">SSIUndefinedEcho</a></code>.</p> + + <div class="example"><p><code> + <!--#config echomsg="[Valeur non définie]" --> + </code></p></div> + + </dd> + + <dt><code>errmsg</code></dt> + <dd><p>La valeur est un message qui sera envoyé au client si une + erreur survient lors de l'interprétation du document. Cet attribut + l'emporte sur toute directive <code class="directive"><a href="#ssierrormsg">SSIErrorMsg</a></code>.</p> + + <div class="example"><p><code> + <!--#config errmsg="[Zut, quelque chose s'est mal passé.]" --> + </code></p></div> + + </dd> + + <dt><code>sizefmt</code></dt> + <dd><p>La valeur définit l'unité employée lors de l'affichage de la + taille d'un fichier. Les valeurs possibles sont <code>bytes</code> + pour une taille en octets, ou <code>abbrev</code> pour une taille + en Ko ou Mo selon son importance ; par exemple, une taille de 1024 + octets sera affichée sous la forme "1K".</p> + + <div class="example"><p><code> + <!--#config sizefmt="abbrev" --> + </code></p></div> + + </dd> + + <dt><code>timefmt</code></dt> + <dd><p>La valeur est une chaîne que pourra utiliser la fonction de la + bibliothèque standard <code>strftime(3)</code> lors de l'affichage + des dates.</p> + + <div class="example"><p><code> + <!--#config timefmt=""%R, %B %d, %Y"" --> + </code></p></div> + + </dd> + + </dl> + + + <h3><a name="element.echo" id="element.echo">L'élément echo</a></h3> + <p>Cette commande affiche le contenu d'une des <a href="#includevars">variables include</a> définies ci-dessous. Si + la variable n'est pas définie, le résultat est déterminé par la + valeur de la directive <code class="directive"><a href="#ssiundefinedecho">SSIUndefinedEcho</a></code>. Le format d'affichage des dates est + défini par l'attribut <code>timefmt</code> de la commande + config.</p> + + <p>Attributs:</p> + + <dl> + <dt><code>var</code></dt> + <dd>La valeur est le nom de la variable à afficher.</dd> + + <dt><code>decoding</code></dt> + <dd><p>Spécifie si Apache doit effectuer un décodage dans la + variable avant son traitement ultérieur. La valeur par défaut est + <code>none</code>, et dans ce cas, aucun décodage n'est effectué. + Si la valeur est <code>url</code>, un décodage de type URL sera + effectué (il s'agit du codage de type %-encoding utilisé dans les + URLs des liens, etc...). Si la valeur est <code>urlencoded</code>, + c'est un décodage des éléments de type + application/x-www-form-urlencode (que l'on trouve dans les chaînes + de paramètres) qui sera effectué. Si la valeur est + <code>base64</code>, un + decodage de type base64 sera effectué, et si elle est + <code>entity</code>, c'est un décodage des entités HTML qui sera + effectué. Ce décodage est effectué avant tout codage ultérieur de + la variable. Il est possible d'effectuer plusieurs décodages en + spécifiant plusieurs valeurs séparées par des virgules. Les + spécifications de décodages restent valables jusqu'au prochain + attribut de décodage, ou la fin de l'élément.</p> + + <p>Pour être pris en compte, l'attribut de <code>décodage</code> + doit <em>précéder</em> l'attribut <code>var</code> correspondant.</p> + </dd> + + <dt><code>encoding</code></dt> + <dd><p>Spécifie la manière dont Apache va coder les caractères + spéciaux que la variable contient avant leur affichage. S'il est + défini à <code>none</code>, aucun codage ne sera effectué. S'il + est défini à <code>url</code>, un codage de type URL sera effectué + (aussi connu sous le nom de codage avec caractères % , il convient + pour les URLS des liens, etc...). S'il est défini à + <code>urlencoded</code>, c'est un codage compatible + application/x-www-form-urlencoded qui sera effectué (à utiliser + dans les chaînes de paramètres). S'il est défini à + <code>base64</code>, c'est un encodage de type base64 qui sera + effectué. Au début d'un élément + <code>echo</code>, la valeur par défaut est définie à + <code>entity</code>, ce qui correspond à un codage de type entité + (codage qui convient pour un élément HTML de type bloc, comme le + paragraphe d'un texte). Cette valeur par défaut peut être modifiée + en ajoutant un attribut <code>encoding</code>, qui fera effet + jusqu'à la définition d'un nouvel attribut <code>encoding</code> + ou la fin de l'élément echo.</p> + + <p>Pour produire son effet, l'attribut <code>encoding</code> doit + précéder l'attribut <code>var</code> concerné.</p> + + <div class="warning"> + Afin de prévenir les attaques de type cross-site scripting, il + est recommandé de <em>toujours</em> encoder les données fournies + par les utilisateurs. + </div> + + <div class="example"><h3>Example</h3><p><code> + <!--#echo encoding="entity" var="QUERY_STRING" --> + </code></p></div> + </dd> + </dl> + + + <h3><a name="element.exec" id="element.exec">L'élément exec</a></h3> + <p>La commande <code>exec</code> exécute la commande shell ou le + script spécifié. Elle nécessite le chargement du module + <code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code>. Si <code class="directive"><a href="../mod/core.html#options">Options</a></code> <code>IncludesNOEXEC</code> est + définie, cette commande est désactivée. Les attributs disponibles + sont :</p> + + <dl> + <dt><code>cgi</code></dt> + <dd><p>La valeur spécifie un chemin URL vers le script CGI (encodé + avec caractères %). Si le chemin ne commence pas par un slash (/), + il est considéré comme relatif au document courant. Le document + référencé par ce chemin est invoqué en tant que script CGI, même + s'il n'est pas censé être reconnu comme tel par le serveur. Les + scripts CGI doivent cependant être activés dans le répertoire qui + contient les scripts (via la directive <code class="directive"><a href="../mod/mod_alias.html#scriptalias">ScriptAlias</a></code> ou l'<code class="directive"><a href="../mod/core.html#options">Options</a></code> <code>ExecCGI</code>).</p> + + <p>Le <code>PATH_INFO</code> et la chaîne d'arguments + (<code>QUERY_STRING</code>) de la requête originale du client sont + fournis au script CGI ; ils <em>ne peuvent pas</em> être spécifiés + dans le chemin de l'URL. Le script disposera des variables include + en plus de l'environnement standard <a href="mod_cgi.html">CGI</a>.</p> + + <div class="example"><h3>Exemple</h3><p><code> + <!--#exec cgi="/cgi-bin/exemple.cgi" --> + </code></p></div> + + <p>Si, à la place d'un flux de sortie, le script renvoie un + en-tête <code>Location:</code>, ce dernier sera traduit en ancrage + HTML.</p> + + <p>L'élément <code><a href="#includevirtual">include + virtual</a></code> doit être préféré à <code>exec cgi</code>. En + particulier, si vous devez transmettre des arguments + supplémentaires à un programme CGI en utilisant la chaîne + d'arguments de la requête, c'est impossible avec <code>exec + cgi</code>, mais vous pouvez y parvenir avec <code>include + virtual</code> comme suit :</p> + + <div class="example"><p><code> + <!--#include virtual="/cgi-bin/exemple.cgi?argument=valeur" --> + </code></p></div> + </dd> + + <dt><code>cmd</code></dt> + <dd><p>Le serveur va exécuter la commande fournie en utilisant + <code>/bin/sh</code>. La commande dispose des <a href="#includevars">variables include</a>, en plus du jeu habituel + de variables CGI.</p> + + <p>Il est toujours préférable d'utiliser <code><a href="#includevirtual">#include virtual</a></code> à la place de + <code>#exec cgi</code> ou <code>#exec cmd</code>. <code>#include + virtual</code> utilise le mécanisme standard des sous-requêtes + d'Apache pour inclure des fichiers ou des scripts. Il a fait + l'objet de tests plus approfondis et sa maintenance est mieux + suivie.</p> + + <p>De plus, sur certaines plate-formes, comme Win32, et sous unix, + si l'on utilise <a href="../suexec.html">suexec</a>, il est + impossible de transmettre des arguments à une commande dans une + directive <code>exec</code>, à moins d'insérer des espaces dans la + commande. Ainsi, alors que ce qui suit fonctionnera sous unix avec + une configuration sans suexec, l'effet produit ne sera pas celui + désiré sous Win32, ou dans le cas de l'utilisation de suexec + :</p> + + <div class="example"><p><code> + <!--#exec cmd="perl /chemin/vers/script_perl arg1 arg2" --> + </code></p></div> + </dd> + </dl> + + + <h3><a name="element.fsize" id="element.fsize">L'élément fsize</a></h3> + <p>Cette commande permet d'afficher la taille du fichier spécifié + en fonction des spécifications de format de <code>sizefmt</code>. + Attributs :</p> + + <dl> + <dt><code>file</code></dt> + <dd>La valeur est le chemin du fichier, relatif au répertoire + contenant le document en cours d'interprétation. + + <div class="example"><p><code> + Ce fichier a une taille de <!--#fsize file="mod_include.html" + --> octets. + </code></p></div> + + La valeur de <code>file</code> ne peut pas faire référence à un + fichier situé à un niveau supérieur de l'arborescence du répertoire + courant ou en dehors de la racine des documents ; il ne peut donc + ni commencer par un slash, ni contenir la séquence de caractères + <code>../</code>. Si c'est le cas, le message d'erreur <code>The + given path was above the root path</code> sera renvoyé. + </dd> + + <dt><code>virtual</code></dt> + <dd>La valeur est un chemin URL (codé avec caractères %). S'il ne + commence pas par un slash (/), il est considéré comme relatif au + document courant. Notez que cette commande n'affiche <em>pas</em> + la taille de la sortie d'un programme CGI, mais la taille du + programme CGI lui-même.</dd> + </dl> + + <div class="example"><p><code> + Ce fichier a une taille de <!--#fsize + virtual="/docs/mod/mod_include.html" --> octets. + </code></p></div> + + <p>Notez que dans la plupart des cas, ces deux attributs sont + identiques. Cependant, l'attribut <code>file</code> ne respecte + pas les aliases URL-space.</p> + + + <h3><a name="element.flastmod" id="element.flastmod">L'élément flastmod</a></h3> + <p>Cette commande permet d'afficher la date de dernière + modification du fichier spécifié, en fonction des spécifications + de format de <code>timefmt</code>. Les attributs sont les mêmes + que ceux de la commande <code><a href="#element.fsize">fsize</a></code>.</p> + + + <h3><a name="element.include" id="element.include">L'élément include</a></h3> + <p>Cette commande permet d'insérer le texte d'un autre document ou + fichier dans le fichier en cours d'interprétation. Tout fichier + inclus est soumis au contrôle d'accès habituel. Si <a href="core.html#options">Options</a> <code>IncludesNOEXEC</code> + est défini pour le répertoire contenant le fichier + interprété, seuls les documents possèdant un + <a class="glossarylink" href="../glossary.html#type mime" title="voir glossaire">type MIME</a> de type texte + (<code>text/plain</code>, <code>text/html</code>, etc...) seront + inclus. Les scripts CGI, quant à eux, sont invoqués de manière + habituelle en utilisant l'URL complète fournie avec la commande, y + compris toute chaîne d'arguments éventuelle.</p> + + <p>Un attribut définit le chemin du document à inclure, et peut + apparaître plusieurs fois dans l'élément à inclure ; en retour, pour + chaque attribut fourni à la commande include, une inclusion est + effectuée. Les attributs disponibles sont :</p> + + <dl> + <dt><code>file</code></dt> + <dd>La valeur est un chemin relatif au répertoire contenant le + fichier en cours d'interprétation. Elle ne peut ni contenir + <code>../</code>, ni être un chemin absolu. Ainsi, vous ne pouvez + pas inclure de fichiers situés en dehors de l'arborescence du + site web ou dans un niveau supérieur à celui du fichier courant + dans cette arborescence. Il est toujours préférable d'utiliser + l'attribut <code>virtual</code>.</dd> + + <dt><code><a id="includevirtual" name="includevirtual">virtual</a></code></dt> + <dd><p>La valeur est un chemin URL (codé avec caractères %). L'URL + ne peut contenir qu'un chemin et une chaîne d'arguments + éventuelle, à l'exclusion de tout protocole ou nom d'hôte. S'il ne + commence pas par un slash (/), il est considéré comme relatif au + document courant.</p> + + <p>Une URL est construite à partir de l'attribut, et la sortie que + renverrait le serveur si l'URL était accédée par le client est + incluse dans la sortie interprétée. Les inclusions de fichiers + peuvent ainsi être imbriquées.</p> + + <p>Si l'URL spécifiée correspond à un programme CGI, le programme + sera exécuté, et son flux de sortie inséré à la place de la + directive dans le fichier interprété. Vous pouvez insérer une + chaîne d'arguments dans une URL correspond à un programme CGI + :</p> + + <div class="example"><p><code> + <!--#include virtual="/cgi-bin/exemple.cgi?argument=valeur" --> + </code></p></div> + + <p><code>include virtual</code> doit être préféré à <code>exec + cgi</code> pour inclure le flux de sortie d'un programme CGI dans + un document HTML.</p> + + <p>Si la directive <code class="directive"><a href="../mod/mod_request.html#keptbodysize">KeptBodySize</a></code> est correctement + définie et valide pour le fichier inclus, les tentatives de + requêtes POST vers le document HTML qui inclut des fichiers seront + transmises aux sous-requêtes en tant que requêtes POST + elles-mêmes. Sans cette directive, toutes les sous-requêtes sont + traitées en tant que requêtes GET.</p> + + </dd> + + <dt><code>onerror</code></dt> + <dd><p>La valeur est un chemin-URL (codé-%) qui est affiché si une + tentative précédente d'inclure un fichier ou un attribut virtuel a + échoué. Pour produire son effet, cet attribut doit être spécifié + après le fichier ou les attributs virtuels concernés. Si la + tentative d'inclure le chemin onerror échoue, ou si onerror n'est + pas spécifié, c'est le message d'erreur par défaut qui sera + inclus.</p> + + <div class="example"><p><code> + # Exemple simple<br /> + <!--#include virtual="/not-exist.html" onerror="/error.html" --> + </code></p></div> + + <div class="example"><p><code> + # Chemins onerror dédiés<br /> + <!--#include virtual="/path-a.html" onerror="/error-a.html" virtual="/path-b.html" onerror="/error-b.html" --> + </code></p></div> + + </dd> + </dl> + + + <h3><a name="element.printenv" id="element.printenv">L'élément printenv</a></h3> + <p>Cette commande affiche la liste en mode texte de toutes les variables et de + leurs valeurs. Les caractères spéciaux sont encodés <code>entity</code> avant + d'être affichés (se reporter à l'élément <code><a href="#element.echo">echo</a></code> pour plus de détails). Cette + commande ne comporte pas d'attributs.</p> + + <div class="example"><h3>Exemple</h3><p><code> + <pre> + <!--#printenv --> + </pre> + </code></p></div> + + + <h3><a name="element.set" id="element.set">L'élément set</a></h3> + <p>Cette commande permet de définir la valeur d'une variable. Les + attributs sont :</p> + + <dl> + <dt><code>var</code></dt> + <dd>Le nom de la variable à définir.</dd> + + <dt><code>value</code></dt> + <dd>La valeur à affecter à la variable.</dd> + <dt><code>decoding</code></dt> + <dd><p>Spécifie si Apache doit effectuer un décodage dans la + variable avant son traitement ultérieur. La valeur par défaut est + <code>none</code>, et dans ce cas, aucun décodage n'est effectué. + Si la valeur est <code>url</code>, <code>urlencoded</code>, + <code>base64</code> ou + <code>entity</code>, c'est un décodage de type URL, + application/x-www-form-urlencoded, base64 ou + entité HTML qui sera respectivement effectué. Il est possible + d'effectuer plusieurs décodages en + spécifiant plusieurs valeurs séparées par des virgules. Les + spécifications de décodages restent valables jusqu'au prochain + attribut de décodage, ou la fin de l'élément. Pour être pris en + compte, l'attribut de <code>décodage</code> + doit <em>précéder</em> l'attribut <code>var</code> correspondant.</p> + </dd> + + <dt><code>encoding</code></dt> + <dd><p>Spécifie la manière dont Apache va encoder les caractères + spéciaux que la variable contient avant leur affichage. S'il est + défini à <code>none</code>, aucun encodage ne sera effectué. Si la + valeur est <code>url</code>, <code>urlencoding</code>, + <code>base64</code> ou + <code>entity</code>, c'est un encodage de type URL, + application/x-www-form-urlencoded, base64 ou + entité HTML qui sera respectivement effectué. Il est possible de + spécifier plusieurs types d'encodage en les séparant par des + virgules. La spécification du type d'encodage fera effet + jusqu'à la définition d'un nouvel attribut encoding + ou la fin de l'élément. Pour produire son effet, l'attribut <code>encoding</code> doit + précéder l'attribut <code>var</code> concerné. Les encodages sont + effectués après les opérations de décodage.</p> + </dd> + + </dl> + + <div class="example"><h3>Exemple</h3><p><code> + <!--#set var="category" value="help" --> + </code></p></div> + +</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="section"> +<h2><a name="includevars" id="includevars">Variables include</a></h2> + + + <p>À l'instar des variables de l'environnement CGI standard, ces + variables sont mises à la disposition de la commande + <code>echo</code>, des opérateurs conditionnels <code>if</code> et + <code>elif</code>, et de tout programme invoqué par le document.</p> + + <dl> + <dt><code>DATE_GMT</code></dt> + <dd>La date GMT (Greenwich Mean Time) courante.</dd> + + <dt><code>DATE_LOCAL</code></dt> + <dd>La date locale courante.</dd> + + <dt><code>DOCUMENT_ARGS</code></dt> + <dd>Cette variable contient la chaîne de paramètres de la requête du + document SSI actif, ou la chaîne vide si aucune chaîne de paramètres de + requête n'est incluse. Pour les sous-requêtes invoquées par la directive + SSI <code>include</code>, <code>QUERY_STRING</code> contiendra la chaîne + de paramètres de la sous-requête et <code>DOCUMENT_ARGS</code> la chaîne + de paramètres du document SSI (disponible à partir de la version 2.4.19 du + serveur HTTP Apache).</dd> + + <dt><code>DOCUMENT_NAME</code></dt> + <dd>Le nom de base du fichier demandé par l'utilisateur (sans son + chemin).</dd> + + <dt><code>DOCUMENT_PATH_INFO</code></dt> + <dd>La partie terminale du chemin du fichier. Voir la directive <code class="directive"><a href="../mod/core.html#acceptpathinfo">AcceptPathInfo</a></code> pour plus d'informations à + propos de <code>PATH_INFO</code>.</dd> + + <dt><code>DOCUMENT_URI</code></dt> + <dd>Le chemin URL (caractères % décodés) du document demandé par + l'utilisateur. Notez que dans le cas d'inclusions de fichiers + imbriquées, il ne s'agit <em>pas</em> de l'URL du document + courant. Notez également que si l'URL est modifiée en interne (par + exemple via une directive <code class="directive"><a href="../mod/mod_alias.html#alias">alias</a></code> ou <code class="directive"><a href="../mod/mod_dir.html#directoryindex">directoryindex</a></code>), c'est l'URL modifiée + que contiendra la variable.</dd> + + <dt><code>LAST_MODIFIED</code></dt> + <dd>La date de dernière modification du document demandé par + l'utilisateur.</dd> + + <dt><code>QUERY_STRING_UNESCAPED</code></dt> + <dd>Si une chaîne d'arguments est présente dans la requête pour le + document SSI actif, elle sera affectée à + cette variable, les caractères %-décodés, et éventuellement + <em>échappés</em> pour qu'ils ne soient pas interprétés par le + shell (les caractères spéciaux comme <code>&</code>,etc... + sont précédés d'anti-slashes). Cette variable n'est pas définie si aucune + chaîne d'arguments n'est présente. Utilisez <code>DOCUMENT_ARGS</code> si + l'échappement des caractères du shell n'est pas souhaité.</dd> + + <dt><code>USER_NAME</code></dt> + <dd>Le nom d'utilisateur du propriétaire du fichier.</dd> + </dl> +</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="section"> +<h2><a name="substitution" id="substitution">Substitution de variable</a></h2> + + <p>Une substitution de variable à l'intérieur d'une chaîne entre + guillemets s'effectue dans la plupart des situations où cette + dernière peut raisonablement constituer un argument d'une directive + SSI. Sont concernées les directives <code>config</code>, + <code>exec</code>, <code>flastmod</code>, <code>fsize</code>, + <code>include</code>, <code>echo</code>, et <code>set</code>. Si la + directive <code class="directive"><a href="#ssilegacyexprparser">SSILegacyExprParser</a></code> est définie à + <code>on</code>, la substitution s'effectue aussi dans les arguments + des opérateurs conditionnels. Vous pouvez insérer + un signe dollar en tant que caractère littéral dans une chaîne en + utilisant un anti-slash :</p> + + <div class="example"><p><code> + <!--#set var="cur" value="\$test" --> + </code></p></div> + + <p>Si une référence de variable doit être substituée au beau milieu + d'une séquence de caractères qui pourrait être elle-même considérée + comme un identifiant valide, l'ambiguïté peut être levée en + entourant la référence d'accolades, à la manière du shell :</p> + + <div class="example"><p><code> + <!--#set var="Zed" value="${REMOTE_HOST}_${REQUEST_METHOD}" --> + </code></p></div> + + <p>Dans cet exemple, la variable <code>Zed</code> se verra affecter + la valeur "<code>X_Y</code>" si <code>REMOTE_HOST</code> et + <code>REQUEST_METHOD</code> contiennent respectivement + "<code>X</code>" et "<code>Y</code>".</p> + +</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="section"> +<h2><a name="flowctrl" id="flowctrl">Eléments de contrôle d'inclusion conditionnelle</a></h2> + + + <p>Les éléments de base du contrôle d'inclusion conditionnelle sont + :</p> + + <div class="example"><p><code> + <!--#if expr="<var>test_condition</var>" --><br /> + <!--#elif expr="<var>test_condition</var>" --><br /> + <!--#else --><br /> + <!--#endif --> + </code></p></div> + + <p>L'élément <code>if</code> fonctionne de la même manière que + la directive if d'un langage de programmation. La condition est + évaluée et si le résultat est vrai, le texte qui suit jusqu'au + prochain élément <code>elif</code>, <code>else</code> ou + <code>endif</code> sera inclus dans le flux de sortie.</p> + + <p>Les éléments <code>elif</code> ou <code>else</code> permettent + d'insérer du texte dans le flux de sortie si + <var>test_condition</var> s'est révélé faux. Ces éléments sont + optionnels.</p> + + <p>L'élément <code>endif</code> termine le bloc de traitement + conditionnel <code>if</code> et est obligatoire.</p> + + <p><var>test_condition</var> est une expression booléenne qui + emprunte la syntaxe <a href="../expr.html">ap_expr</a>. La directive + <code class="directive"><a href="#ssilegacyexprparser">SSILegacyExprParser</a></code> + permet de modifier cette syntaxe pour la rendre compatible avec + Apache HTTPD 2.2.x.</p> + + <p>Le jeu de variables SSI avec l'élément <code>var</code> sont + exportées vers l'environnement de la requête et sont accessibles via + la fonction <code>reqenv</code>. Pour faire simple, le nom de + fonction <code>v</code> est aussi disponible dans le module + <code class="module"><a href="../mod/mod_include.html">mod_include</a></code>.</p> + + <p>Dans l'exemple suivant, "depuis le réseau local" sera affiché si + l'adresse IP du client appartient au sous-réseau 10.0.0.0/8.</p> + + <div class="example"><p><code> + <!--#if expr='-R "10.0.0.0/8"' --><br /> + <span class="indent"> + depuis le réseau local<br /> + </span> + <!--#else --><br /> + <span class="indent"> + depuis ailleurs<br /> + </span> + <!--#endif --> + </code></p></div> + + <p>Dans l'exemple suivant, "foo vaut bar" sera affiché si la variable + <code>foo</code> contient la valeur "bar".</p> + + <div class="example"><p><code> + <!--#if expr='v("foo") = "bar"' --><br /> + <span class="indent"> + foo vaut bar<br /> + </span> + <!--#endif --> + </code></p></div> + + <div class="note"><h3>Documentation de référence</h3> + <p>Voir aussi <a href="../expr.html">Les expressions dans le serveur + HTTP Apache</a> pour une référence complète et des exemples. Les + fonctions <em>restricted</em> ne sont pas disponibles dans + <code class="module"><a href="../mod/mod_include.html">mod_include</a></code>.</p> + </div> +</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="section"> +<h2><a name="legacyexpr" id="legacyexpr">Syntaxe des expressions héritée</a></h2> + + + <p>Cette section décrit la syntaxe de l'élément <code>#if + expr</code> dans le cas où la directive <code class="directive"><a href="#ssilegacyexprparser">SSILegacyExprParser</a></code> est définie à + <code>on</code>.</p> + + <dl> + <dt><code><var>chaîne</var></code></dt> + <dd>vrai si <var>chaîne</var> n'est pas vide</dd> + + <dt><code><var>-A string</var></code></dt> + <dd><p>vrai si l'URL que contient la chaîne est accessible du + point de vue de la configuration, faux sinon. Il + s'avère utile lorsqu'un lien vers une URL doit être caché aux + utilisateurs qui ne sont pas autorisés à voir cette URL. Notez que + le test porte sur l'autorisation d'accès à l'URL, et non sur son + existence.</p> + + <div class="example"><h3>Exemple</h3><p><code> + <!--#if expr="-A /prive" --><br /> + <span class="indent"> + Cliquez <a href="/prive">ici</a> pour accéder aux + informations privées.<br /> + </span> + <!--#endif --> + </code></p></div> + </dd> + + <dt><code><var>chaîne1</var> = <var>chaîne2</var><br /> + <var>chaîne1</var> == <var>chaîne2</var><br /> + <var>chaîne1</var> != <var>chaîne2</var></code></dt> + + <dd><p>Compare <var>chaîne1</var> à <var>chaîne2</var>. Si + <var>chaîne2</var> est de la forme + <code>/<var>chaîne2</var>/</code>, elle est traitée comme une + expression rationnelle. Les expressions rationnelles sont + implémentées par le moteur <a href="http://www.pcre.org">PCRE</a> + et possèdent la même syntaxe que celles de <a href="http://www.perl.com">perl 5</a>. Notez que <code>==</code> + n'est qu'un alias pour <code>=</code> et se comporte exactement de + la même manière que ce dernier.</p> + + <p>Si vous faites une comparaison directe (<code>=</code> ou + <code>==</code>), vous pouvez extraire des parties de l'expression + rationnelle. Les parties extraites sont stockées dans les + variables spéciales <code>$1</code> .. <code>$9</code>. L'ensemble + de la chaîne correspondant à l'expression rationnelle est stocké + dans la variable spéciale <code>$0</code>.</p> + + <div class="example"><h3>Exemple</h3><p><code> + <!--#if expr="$QUERY_STRING = /^sid=([a-zA-Z0-9]+)/" --><br /> + <span class="indent"> + <!--#set var="session" value="$1" --><br /> + </span> + <!--#endif --> + </code></p></div> + </dd> + + <dt><code><var>chaîne1</var> < <var>chaîne2</var><br /> + <var>chaîne1</var> <= <var>chaîne2</var><br /> + <var>chaîne1</var> > <var>chaîne2</var><br /> + <var>chaîne1</var> >= <var>chaîne2</var></code></dt> + + <dd>Compare <var>chaîne1</var> à <var>chaîne2</var>. Notez que les + chaînes sont comparées de manière <em>littérale</em> (en utilisant + <code>strcmp(3)</code>). Ainsi, la chaîne "100" est inférieure à + "20".</dd> + + <dt><code>( <var>test_condition</var> )</code></dt> + <dd>vrai si <var>test_condition</var> est vrai</dd> + + <dt><code>! <var>test_condition</var></code></dt> + <dd>vrai si <var>test_condition</var> est faux</dd> + + <dt><code><var>test_condition1</var> && + <var>test_condition2</var></code></dt> + <dd>vrai si <var>test_condition1</var> et + <var>test_condition2</var> sont tous les deux vrais</dd> + + <dt><code><var>test_condition1</var> || + <var>test_condition2</var></code></dt> + <dd>vrai si au moins un des tests <var>test_condition1</var> ou + <var>test_condition2</var> est vrai</dd> + </dl> + + <p>"<code>=</code>" et "<code>!=</code>" ont une priorité supérieure + à "<code>&&</code>" et "<code>||</code>". "<code>!</code>" a + la priorité la plus haute. Ainsi, les deux directives suivantes sont + équivalentes :</p> + + <div class="example"><p><code> + <!--#if expr="$a = test1 && $b = test2" --><br /> + <!--#if expr="($a = test1) && ($b = test2)" --> + </code></p></div> + + <p>Les opérateurs booléens <code>&&</code> et + <code>||</code> ont la même priorité. Ainsi, si vous voulez + augmenter la priorité d'un de ces opérateurs, vous devez utiliser + des parenthèses.</p> + + <p>Tout ce qui n'est pas reconnu comme variable ou opérateur est + traité comme une chaîne. Les chaînes peuvent aussi être entourées + d'apostrophes : <code>'chaîne'</code>. Les chaînes sans apostrophe + ne peuvent pas contenir d'espaces (espaces ou tabulations) car + ceux-ci servent à séparer certains éléments comme les variables. Si + plusieurs chaînes se trouvent dans une ligne, elles sont concaténées + en utilisant des espaces. Ainsi,</p> + + <div class="example"><p><code><var>chaîne1</var> <var>chaîne2</var></code> devient <code><var>chaîne1</var> <var>chaîne2</var></code><br /> + <br /> + et<br /> + <br /> + <code>'<var>chaîne1</var> <var>chaîne2</var>'</code> devient <code><var>chaîne1</var> <var>chaîne2</var></code>.</p></div> + + <div class="note"><h3>Optimisation des expressions booléennes</h3> + <p>Si les expressions atteignent une complexité suffisante pour + ralentir les traitements de manière significative, vous pouvez + essayer de les optimiser en fonction des règles d'évaluation :</p> + <ul> + <li>Les expressions sont évaluées de la gauche vers la droite</li> + <li>Les opérateurs booléens binaires (<code>&&</code> et + <code>||</code>) font l'objet d'une évaluation abrégée chaque fois + que cela est possible. En d'autres termes, et selon la règle + ci-dessus, <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> évalue tout d'abord la + partie gauche de l'expression. Si le résultat de l'évaluation de + cette partie gauche suffit à déterminer le résultat final, + l'évaluation s'arrête ici. Dans le cas contraire, la partie droite + est évaluée, et le résultat final tient compte des résultats des + évaluations des parties gauche et droite.</li> + <li>L'évaluation abrégée est désactivée tant qu'il reste des + expressions régulières à traiter. Ces dernières doivent être + évaluées afin de définir les variables correspondant aux + références arrières (<code>$1</code> .. <code>$9</code>).</li> + </ul> + <p>Si vous voulez déterminer la manière dont une expression est + traitée, vous pouvez recompiler <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> en + utilisant l'option de compilation <code>-DDEBUG_INCLUDE</code>. + Ceci a pour effet d'insérer, pour chaque expression interprétée, + des informations étiquetées, l'arbre d'interprétation et la + manière dont elle est évaluée au sein du flux de sortie envoyé au + client.</p> + </div> + + <div class="note"><h3>Slashes d'échappement dans les expressions + rationnelles</h3> + <p>Tous les caractères slashes qui ne sont pas des séparateurs dans + votre expression rationnelle doivent être échappés, et ceci sans + tenir compte de leur signification du point de vue du moteur + d'expressions rationnelles.</p> + </div> + + <div class="note"><h3>Documentation de référence</h3> + <p>Voir le document <a href="../expr.html">Les expressions dans le + serveur HTTP Apache</a>, pour une référence complète et des exemples.</p> + </div> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ssiendtag" id="ssiendtag">Directive</a> <a name="SSIEndTag" id="SSIEndTag">SSIEndTag</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Chaîne qui termine l'élément include</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>SSIEndTag <var>tag</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>SSIEndTag "-->"</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Base</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_include</td></tr> +</table> + <p>Cette directive permet de modifier la chaîne que + <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> interprète comme la fin d'un élément + include.</p> + + <pre class="prettyprint lang-config">SSIEndTag "%>"</pre> + + + +<h3>Voir aussi</h3> +<ul> +<li><code class="directive"><a href="#ssistarttag">SSIStartTag</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ssierrormsg" id="ssierrormsg">Directive</a> <a name="SSIErrorMsg" id="SSIErrorMsg">SSIErrorMsg</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Message d'erreur affiché lorsqu'une erreur SSI +survient</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>SSIErrorMsg <var>message</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>SSIErrorMsg "[an error occurred while processing this +directive]"</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Surcharges autorisées:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Base</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_include</td></tr> +</table> + <p>La directive <code class="directive">SSIErrorMsg</code> permet de + modifier le message d'erreur affiché lorsqu'une erreur SSI survient. + Pour les serveurs en production, il est recommandé de modifier le + message d'erreur par défaut en <code>"<!-- Error + -->"</code>, de façon à ce que le message ne soit pas + présenté à l'utilisateur.</p> + + <p>Cette directive a le même effet que l'élément + <code><!--#config errmsg=<var>message</var> --></code>.</p> + + <pre class="prettyprint lang-config">SSIErrorMsg "<!-- Error -->"</pre> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ssietag" id="ssietag">Directive</a> <a name="SSIETag" id="SSIETag">SSIETag</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Définit si des en-têtes ETags sont générés par le serveur.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>SSIETag on|off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>SSIETag off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Base</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_include</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>Disponible à partir de la version 2.2.15 du serveur HTTP +Apache.</td></tr> +</table> + <p>Dans le cas général, un fichier filtré par + <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> peut contenir des éléments soit + générés dynamiquement, soit éventuellement modifiés indépendemment + du fichier original. En conséquence, il est demandé par défaut au + serveur de ne pas générer d'en-tête <code>ETag</code> à la réponse + en ajoutant <code>no-etag</code> aux informations de requête.</p> + + <p>Ce comportement peut être modifié via la directive + <code class="directive">SSIETag</code> qui permet au serveur de générer un + en-tête <code>ETag</code>. On peut aussi l'utiliser pour la mise + en cache de la sortie. Notez qu'un serveur d'arrière-plan ou un + générateur de contenu dynamique peut lui-même générer un en-tête + <code>ETag</code>, en ignorant l'information <code>no-etag</code>, + cet en-tête <code>ETag</code> étant transmis par + <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> sans tenir compte de la définition de + la présente directive. La directive <code class="directive">SSIETag</code> + peut prendre une des valeurs suivantes :</p> + + <dl> + + <dt><code>off</code></dt> + <dd><code>no-etag</code> sera ajouté aux informations de + requête, et il sera demandé au serveur de ne pas générer + d'en-tête <code>ETag</code>. Lorsqu'un serveur ignore la valeur + de <code>no-etag</code> et génère tout de même un en-tête + <code>ETag</code>, ce dernier sera respecté.</dd> + + <dt><code>on</code></dt> + <dd>Les en-têtes <code>ETag</code> existants seront respectés, + et ceux générés par le serveur seront ajoutés à la réponse.</dd> + + </dl> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ssilastmodified" id="ssilastmodified">Directive</a> <a name="SSILastModified" id="SSILastModified">SSILastModified</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Définit si des en-têtes <code>Last-Modified</code> sont +générés par le serveur.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>SSILastModified on|off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>SSILastModified off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Base</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_include</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>Disponible à partir de la version 2.2.15 du serveur HTTP +Apache.</td></tr> +</table> + <p>Dans le cas général, un fichier filtré par + <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> peut contenir des éléments soit + générés dynamiquement, soit éventuellement modifiés indépendemment + du fichier original. En conséquence, l'en-tête + <code>Last-Modified</code> est supprimé par défaut de la réponse.</p> + + <p>La directive <code class="directive">SSILastModified</code> permet de + modifier ce comportement en faisant en sorte que l'en-tête + <code>Last-Modified</code> soit respecté s'il est déjà présent, ou + défini dans le cas contraire. On peut aussi l'utiliser pour la mise + en cache de la sortie. La directive + <code class="directive">SSILastModified</code> peut prendre une des + valeurs suivantes :</p> + + <dl> + + <dt><code>off</code></dt> + <dd>L'en-tête <code>Last-Modified</code> sera supprimé des + réponses, à moins que la directive <code class="directive"><a href="#xbithack">XBitHack</a></code> ne soit définie à + <code>full</code> comme décrit plus loin.</dd> + + <dt><code>on</code></dt> + <dd>L'en-tête <code>Last-Modified</code> sera respecté s'il est + déjà présent, et ajouté à la réponse si cette dernière est un + fichier et si l'en-tête est manquant. La directive <code class="directive"><a href="#ssilastmodified">SSILastModified</a></code> l'emporte sur + la directive <code class="directive"><a href="#xbithack">XBitHack</a></code>.</dd> + + </dl> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ssilegacyexprparser" id="ssilegacyexprparser">Directive</a> <a name="SSILegacyExprParser" id="SSILegacyExprParser">SSILegacyExprParser</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Active le mode de compatibilité pour les expressions +conditionnelles.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>SSILegacyExprParser on|off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>SSILegacyExprParser off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Base</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_include</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>Disponible à partir de la version 2.3.13.</td></tr> +</table> + <p>Depuis la version 2.3.13, <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> a adopté + la nouvelle syntaxe <a href="../expr.html">ap_expr</a> pour ses + expressions conditionnelles dans les éléments de contrôle de flux + <code>#if</code>. Cette directive permet de réactiver l'<a href="#legacyexpr">ancienne syntaxe</a> qui est compatible avec les + versions 2.2.x et antérieures d'Apache HTTPD. + </p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ssistarttag" id="ssistarttag">Directive</a> <a name="SSIStartTag" id="SSIStartTag">SSIStartTag</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Chaîne qui marque le début d'un élément +include</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>SSIStartTag <var>tag</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>SSIStartTag "<!--#"</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Base</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_include</td></tr> +</table> + <p>Cette directive permet de modifier la chaîne que + <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> interprète comme le début d'un élément + include.</p> + + <p>Cette option peut vous être utile si vous avez deux serveurs qui + interprètent un fichier avec des commandes différentes (et + éventuellement à des moments différents).</p> + + <pre class="prettyprint lang-config">SSIStartTag "<%" +SSIEndTag "%>"</pre> + + + <p>Avec l'exemple ci-dessus, qui définit aussi une directive + <code class="directive"><a href="#ssiendtag">SSIEndTag</a></code>, vous pourrez + inscrire des directives SSI comme dans l'exemple suivant :</p> + + <div class="example"><h3>Directives SSI avec marques de début et de fin + personnalisées</h3><p><code> + <%printenv %> + </code></p></div> + +<h3>Voir aussi</h3> +<ul> +<li><code class="directive"><a href="#ssiendtag">SSIEndTag</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ssitimeformat" id="ssitimeformat">Directive</a> <a name="SSITimeFormat" id="SSITimeFormat">SSITimeFormat</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configuration du format d'affichage des dates</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>SSITimeFormat <var>chaîne de formatage</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>SSITimeFormat "%A, %d-%b-%Y %H:%M:%S %Z"</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Surcharges autorisées:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Base</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_include</td></tr> +</table> +<p>Cette directive permet de modifier le format d'affichage des +variables d'environnement <code>DATE</code>. La <var>chaîne de +formatage</var> est identique à celle de la fonction +<code>strftime(3)</code> de la bibliothèque C standard.</p> + + <p>Cette directive a le même effet que l'élément + <code><!--#config timefmt=<var>chaîne de formatage</var> + --></code>.</p> + + <pre class="prettyprint lang-config">SSITimeFormat "%R, %B %d, %Y"</pre> + + + <p>Avec l'exemple ci-dessus, les dates seront affichées dans le + style "22:26, June 14, 2002".</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="ssiundefinedecho" id="ssiundefinedecho">Directive</a> <a name="SSIUndefinedEcho" id="SSIUndefinedEcho">SSIUndefinedEcho</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Chaîne à afficher lorsqu'on tente d'extraire le contenu +d'une variable non définie</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>SSIUndefinedEcho <var>chaîne</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>SSIUndefinedEcho "(none)"</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Surcharges autorisées:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Base</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_include</td></tr> +</table> + <p>Cette directive permet de modifier la chaîne affichée par + <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> lorsqu'on tente d'extraire le contenu + d'une variable non définie.</p> + + <pre class="prettyprint lang-config">SSIUndefinedEcho "<!-- nondef -->"</pre> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="xbithack" id="xbithack">Directive</a> <a name="XBitHack" id="XBitHack">XBitHack</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Interprète les directives SSI dans les fichiers dont le bit +d'exécution est positionné</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>XBitHack on|off|full</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>XBitHack off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">Surcharges autorisées:</a></th><td>Options</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Base</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_include</td></tr> +</table> + <p>La directive <code class="directive">XBitHack</code> permet de contrôler + l'interprétation des documents html standards. Elle n'affecte que + les fichiers dont le <a class="glossarylink" href="../glossary.html#type mime" title="voir glossaire">type MIME</a> est + <code>text/html</code>. <code class="directive">XBitHack</code> peut prendre + les valeurs suivantes :</p> + + <dl> + <dt><code>off</code></dt> + <dd>Aucun traitement particulier pour les fichiers + exécutables.</dd> + + <dt><code>on</code></dt> + <dd>Tout fichier <code>text/html</code> dont le bit d'exécution + est positionné pour le propriétaire sera traité en tant que + document html interprété par le serveur.</dd> + + <dt><code>full</code></dt> + <dd>Identique à <code>on</code>, avec test du bit d'exécution pour + le groupe. Si ce dernier est positionné, la date de <code>dernière + modification</code> du fichier renvoyé est définie à la date de + dernière modification du fichier. Dans le cas contraire, aucune + date de dernière modification n'est renvoyée. Le positionnement de + ce bit permet aux clients et aux mandataires de gérer la mise en + cache du résultat de la requête. + + <div class="note"><h3>Note</h3> + <p>Il est recommandé de n'utiliser l'option full que dans le cas + où vous êtes certain que le bit d'exécution du groupe est non + positionné pour les scripts SSI qui pourraient effectuer l'<code>#include</code> d'un programme CGI ou bien produire des sorties + différentes à chaque accès (ou seraient susceptibles d'être + modifiées au cours des requêtes ultérieures).</p> + + <p>Lorsqu'elle est définie à <code>on</code>, la directive + <code class="directive"><a href="#ssilastmodified">SSILastModified</a></code> + l'emporte sur la directive <code class="directive"><a href="#xbithack">XBitHack</a></code>.</p> + </div> + + </dd> + </dl> + + +</div> +</div> +<div class="bottomlang"> +<p><span>Langues Disponibles: </span><a href="../en/mod/mod_include.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="../fr/mod/mod_include.html" title="Français"> fr </a> | +<a href="../ja/mod/mod_include.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a></p> +</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">Commentaires</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&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> +<script type="text/javascript"><!--//--><![CDATA[//><!-- +var comments_shortname = 'httpd'; +var comments_identifier = 'http://httpd.apache.org/docs/2.4/mod/mod_include.html'; +(function(w, d) { + if (w.location.hostname.toLowerCase() == "httpd.apache.org") { + d.write('<div id="comments_thread"><\/div>'); + var s = d.createElement('script'); + s.type = 'text/javascript'; + s.async = true; + s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier; + (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s); + } + else { + d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>'); + } +})(window, document); +//--><!]]></script></div><div id="footer"> +<p class="apache">Copyright 2019 The Apache Software Foundation.<br />Autorisé sous <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p> +<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossaire</a> | <a href="../sitemap.html">Plan du site</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!-- +if (typeof(prettyPrint) !== 'undefined') { + prettyPrint(); +} +//--><!]]></script> +</body></html>
\ No newline at end of file diff --git a/docs/manual/mod/mod_include.html.ja.utf8 b/docs/manual/mod/mod_include.html.ja.utf8 new file mode 100644 index 0000000..386d714 --- /dev/null +++ b/docs/manual/mod/mod_include.html.ja.utf8 @@ -0,0 +1,901 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"><head> +<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> +<!-- + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + This file is generated from xml source: DO NOT EDIT + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + --> +<title>mod_include - Apache HTTP サームãƒãƒ¼ã‚¸ãƒ§ãƒ³ 2.4</title> +<link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /> +<link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /> +<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" /> +<script src="../style/scripts/prettify.min.js" type="text/javascript"> +</script> + +<link href="../images/favicon.ico" rel="shortcut icon" /></head> +<body> +<div id="page-header"> +<p class="menu"><a href="../mod/">モジュール</a> | <a href="../mod/directives.html">ディレクティブ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">用語</a> | <a href="../sitemap.html">サイトマップ</a></p> +<p class="apache">Apache HTTP サームãƒãƒ¼ã‚¸ãƒ§ãƒ³ 2.4</p> +<img alt="" src="../images/feather.png" /></div> +<div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div> +<div id="path"> +<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP サーãƒ</a> > <a href="http://httpd.apache.org/docs/">ドã‚ュメンテーション</a> > <a href="../">ãƒãƒ¼ã‚¸ãƒ§ãƒ³ 2.4</a> > <a href="./">モジュール</a></div> +<div id="page-content"> +<div id="preamble"><h1>Apache モジュール mod_include</h1> +<div class="toplang"> +<p><span>翻訳済ã¿è¨€èªž: </span><a href="../en/mod/mod_include.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="../fr/mod/mod_include.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="../ja/mod/mod_include.html" title="Japanese"> ja </a></p> +</div> +<div class="outofdate">ã“ã®æ—¥æœ¬èªžè¨³ã¯ã™ã§ã«å¤ããªã£ã¦ã„ã‚‹ + å¯èƒ½æ€§ãŒã‚りã¾ã™ã€‚ + 最近更新ã•れãŸå†…容を見るã«ã¯è‹±èªžç‰ˆã‚’ã”覧下ã•ã„。 + </div> +<table class="module"><tr><th><a href="module-dict.html#Description">説明:</a></th><td>サーãƒãŒãƒ‘ースã™ã‚‹ html ドã‚ュメント (Server Side Includes)</td></tr> +<tr><th><a href="module-dict.html#Status">ステータス:</a></th><td>Base</td></tr> +<tr><th><a href="module-dict.html#ModuleIdentifier">モジュールè˜åˆ¥å:</a></th><td>include_module</td></tr> +<tr><th><a href="module-dict.html#SourceFile">ソースファイル:</a></th><td>mod_include.c</td></tr> +<tr><th><a href="module-dict.html#Compatibility">äº’æ›æ€§:</a></th><td>Apache 2.0 ã‹ã‚‰å‡ºåŠ›ãƒ•ã‚£ãƒ«ã‚¿ã¨ã—ã¦å®Ÿè£…ã•れã¾ã—ãŸã€‚</td></tr></table> +<h3>概è¦</h3> + + <p>ã“ã®ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã¯ãƒ•ァイルãŒã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«é€ã‚‰ã‚Œã‚‹å‰ã«å‡¦ç†ã™ã‚‹ãƒ•ィルタを + æä¾›ã—ã¾ã™ã€‚処ç†ã®å†…容ã¯<dfn>è¦ç´ </dfn>ã¨å‘¼ã°ã‚Œã‚‹ç‰¹åˆ¥ãªå½¢å¼ã® SGML コメントã«ã‚ˆã‚Š + 制御ã•れã¾ã™ã€‚ã“れらã®è¦ç´ ã¯æ¡ä»¶åˆ†å²ã‚„ã€ä»–ã®ãƒ•ァイルや + プãƒã‚°ãƒ©ãƒ ã®å‡ºåŠ›ã®å–り込ã¿ã€ç’°å¢ƒå¤‰æ•°ã®è¨å®šã‚„表示を行ãªã†ã“ã¨ãŒ + ã§ãã¾ã™ã€‚</p> +</div> +<div id="quickview"><a href="https://www.apache.org/foundation/contributing.html" class="badge"><img src="https://www.apache.org/images/SupportApache-small.png" alt="Support Apache!" /></a><h3>トピック</h3> +<ul id="topics"> +<li><img alt="" src="../images/down.gif" /> <a href="#enabling">Server-Side Includes を有効ã«ã™ã‚‹</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#pathinfo">サーãƒã‚µã‚¤ãƒ‰ã‚¤ãƒ³ã‚¯ãƒ«ãƒ¼ãƒ‰ (SSI) ã§ã® PATH_INFO</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#elements">基本è¦ç´ </a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#includevars">Include 変数</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#substitution">変数置æ›</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#flowctrl">フãƒãƒ¼åˆ¶å¾¡è¦ç´ </a></li> +</ul><h3 class="directives">ディレクティブ</h3> +<ul id="toc"> +<li><img alt="" src="../images/down.gif" /> <a href="#ssiendtag">SSIEndTag</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ssierrormsg">SSIErrorMsg</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ssietag">SSIETag</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ssilastmodified">SSILastModified</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ssilegacyexprparser">SSILegacyExprParser</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ssistarttag">SSIStartTag</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ssitimeformat">SSITimeFormat</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#ssiundefinedecho">SSIUndefinedEcho</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#xbithack">XBitHack</a></li> +</ul> +<h3>Bugfix checklist</h3><ul class="seealso"><li><a href="https://www.apache.org/dist/httpd/CHANGES_2.4">httpd changelog</a></li><li><a href="https://bz.apache.org/bugzilla/buglist.cgi?bug_status=__open__&list_id=144532&product=Apache%20httpd-2&query_format=specific&order=changeddate%20DESC%2Cpriority%2Cbug_severity&component=mod_include">Known issues</a></li><li><a href="https://bz.apache.org/bugzilla/enter_bug.cgi?product=Apache%20httpd-2&component=mod_include">Report a bug</a></li></ul><h3>å‚ç…§</h3> +<ul class="seealso"> +<li><code class="directive"><a href="../mod/core.html#options">Options</a></code></li> +<li><code class="directive"><a href="../mod/core.html#acceptpathinfo">AcceptPathInfo</a></code></li> +<li><a href="../filter.html">フィルタ</a></li> +<li><a href="../howto/ssi.html">SSI ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«</a></li> +<li><a href="#comments_section">コメント</a></li></ul></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="section"> +<h2><a name="enabling" id="enabling">Server-Side Includes を有効ã«ã™ã‚‹</a></h2> + + + <p>Server Side Includes 㯠<code>INCLUDES</code> + <a href="../filter.html">フィルタ</a> ã«ã‚ˆã‚Šå®Ÿè£…ã•れã¦ã„ã¾ã™ã€‚ + Server-side include ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒ†ã‚£ãƒ–ã‚’å«ã‚€ãƒ‰ã‚ãƒ¥ãƒ¡ãƒ³ãƒˆã®æ‹¡å¼µå㌠+ .shtml ã®å ´åˆã€ä»¥ä¸‹ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒ†ã‚£ãƒ–ã§ã¯ Apache ãŒãれらを + パースã—ã¦ã€ãã®çµæžœã§ãるドã‚ュメント㫠<code>text/html</code> ã® + MIME タイプを割り当ã¦ã¾ã™:</p> + + <div class="example"><p><code> + AddType text/html .shtml<br /> + AddOutputFilter INCLUDES .shtml + </code></p></div> + + <p>以下ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒ†ã‚£ãƒ–㯠shtml ファイルã®ã‚ã‚‹ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã§æŒ‡å®šã•れã¦ã„ã‚‹ + å¿…è¦ãŒã‚りã¾ã™ (通常㯠<code class="directive"><a href="../mod/core.html#directory"><Directory></a></code> ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§æŒ‡å®šã—ã¾ã™ãŒã€ + <code class="directive"><a href="../mod/core.html#allowoverride">AllowOverride</a></code> <code>Options</code> + ãŒè¨å®šã•れã¦ã„ã‚‹ã¨ã€<code>.htaccess</code> ãƒ•ã‚¡ã‚¤ãƒ«ã«æ›¸ãã“ã¨ã‚‚ã§ãã¾ã™):</p> + + <div class="example"><p><code> + Options +Includes + </code></p></div> + + <p>äº’æ›æ€§ã‚’ä¿ã¤ãŸã‚ã«ã€<code>server-parsed</code> + <a href="../handler.html">ãƒãƒ³ãƒ‰ãƒ©</a> ã‚‚ INCLUDES フィルタを + 有効ã«ã—ã¾ã™ã€‚MIME タイプ <code>text/x-server-parsed-html</code> ã‚„ + <code>text/x-server-parsed-html3</code> ã®ãƒ‰ã‚ュメントã«å¯¾ã—ã¦ã‚‚ + Apache 㯠INCLUDES フィルタを有効ã«ã—ã¾ã™ (出力ã•れるもã®ã¯ + MIME タイプ <code>text/html</code> ã«ãªã‚Šã¾ã™)。</p> + + <p>詳ã—ã„æƒ…å ±ã¯ <a href="../howto/ssi.html">Tutorial on Server Side Includes</a>.</p> +</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="section"> +<h2><a name="pathinfo" id="pathinfo">サーãƒã‚µã‚¤ãƒ‰ã‚¤ãƒ³ã‚¯ãƒ«ãƒ¼ãƒ‰ (SSI) ã§ã® PATH_INFO</a></h2> + + + <p>SSI ã§å‡¦ç†ã•れるファイルã¯ãƒ‡ãƒ•ォルトã§ã¯ <code>PATH_INFO</code> + (後続ã®ãƒ‘ã‚¹åæƒ…å ±) + 付ãã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’å—ã‘入れãªããªã‚Šã¾ã—ãŸã€‚<code class="directive"><a href="../mod/core.html#acceptpathinfo">AcceptPathInfo</a></code> ディレクティブ㧠+ <code>PATH_INFO</code> 付ãã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’å—ã‘入れるよã†ã«ã‚µãƒ¼ãƒã‚’ + è¨å®šã§ãã¾ã™ã€‚</p> +</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="section"> +<h2><a name="elements" id="elements">基本è¦ç´ </a></h2> + <p>ドã‚ュメントã¯ã€SGML ã®ã‚³ãƒ¡ãƒ³ãƒˆã¨ã—ã¦ç‰¹åˆ¥ãªã‚³ãƒžãƒ³ãƒ‰ãŒåŸ‹ã‚è¾¼ã¾ã‚ŒãŸ + HTML ドã‚ュメントã¨ã—ã¦ãƒ‘ースã•れã¾ã™ã€‚ã‚³ãƒžãƒ³ãƒ‰ã®æ§‹æ–‡ã¯æ¬¡ã®ã‚ˆã†ã« + ãªã£ã¦ã„ã¾ã™:</p> + + <div class="example"><p><code> + <!--#<var>element</var> <var>attribute</var>=<var>value</var> + <var>attribute</var>=<var>value</var> ... --> + </code></p></div> + + <p>値 <span class="transnote">(<em>訳注:</em> value)</span> ã¯äºŒé‡å¼•用符ã§å›²ã‚€ã®ãŒä¸€èˆ¬çš„ã§ã™ãŒã€ + シングルクオート (') ã¨ãƒãƒƒã‚¯ã‚¯ã‚ªãƒ¼ãƒˆ (`) も使用ã§ãã¾ã™ã€‚ + 多ãã®ã‚³ãƒžãƒ³ãƒ‰ã¯å±žæ€§-値 <span class="transnote">(<em>訳注:</em> attribute-value)</span> ã®çµ„を一ã¤ã ã‘æŒ‡å®šã§ãã¾ã™ã€‚ + コメントã®çµ‚ã‚り (<code>--></code>) + ã®å‰ã«ã¯ã€SSI ã®å¥ã®ä¸€éƒ¨ã ã¨è§£é‡ˆã•れãªã„よã†ã«ã™ã‚‹ãŸã‚ã«ç©ºç™½ã‚’ + 入れã¦ãã ã•ã„。最åˆã® <code><!--#</code> ã¯ã¾ã¨ã‚ã¦<em>一ã¤</em>ã® + å¥ã§ã€ç©ºç™½ã‚’ãµãã‚“ã§ã¯ã„ã‘ãªã„ã“ã¨æ³¨æ„ã—ã¦ãã ã•ã„。</p> + + <p>è¦ç´ <span class="transnote">(<em>訳注:</em> element)</span> を以下ã®è¡¨ã«ç¤ºã—ã¾ã™ã€‚</p> + + <table class="bordered"> + <tr><th>è¦ç´ </th><th>説明</th></tr> + <tr><td><code><a href="#element.config">config</a></code></td> + <td>configure output formats</td></tr> + <tr><td><code><a href="#element.echo">echo</a></code></td> + <td>print variables</td></tr> + <tr><td><code><a href="#element.exec">exec</a></code></td> + <td>execute external programs</td></tr> + <tr><td><code><a href="#element.fsize">fsize</a></code></td> + <td>print size of a file</td></tr> + <tr><td><code><a href="#element.flastmod">flastmod</a></code></td> + <td>print last modification time of a file</td></tr> + <tr><td><code><a href="#element.include">include</a></code></td> + <td>include a file</td></tr> + <tr><td><code><a href="#element.printenv">printenv</a></code></td> + <td>print all available variables</td></tr> + <tr><td><code><a href="#element.set">set</a></code></td> + <td>set a value of a variable</td></tr> + </table> + + <p>SSI è¦ç´ 㯠<code class="module"><a href="../mod/mod_include.html">mod_include</a></code> 以外ã®ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã§ + 定義ã•れるã“ã¨ã‚‚ã‚りã¾ã™ã€‚実際〠+ <code><a href="#element.exec">exec</a></code> è¦ç´ 㯠+ <code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code> ã§æä¾›ã•れã¦ã„ã¦ã€ã“ã®ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ãŒ + ãƒãƒ¼ãƒ‰ã•ã‚Œã‚‹å ´åˆã«ã®ã¿åˆ©ç”¨å¯èƒ½ã¨ãªã‚Šã¾ã™ã€‚</p> + + <h3><a name="element.config" id="element.config">config è¦ç´ </a></h3> + <p>次ã®ã‚³ãƒžãƒ³ãƒ‰ã¯è§£æžã®æ§˜ã€…ãªå´é¢ã‚’制御ã—ã¾ã™ã€‚å±žæ€§ã¯æ¬¡ã®é€šã‚Šã§ã™ã€‚</p> + + <dl> + <dt><code>echomsg</code> (<em>Apache 2.1 以é™</em>)</dt> + <dd>指定ã•れる値ã¯ã€<code><a href="#element.echo">echo</a></code> + è¦ç´ ãŒæœªå®šç¾©ã®å¤‰æ•°ã‚’エコーã—よã†ã¨ã—ãŸéš›ã«ã€ + クライアントã«é€ã‚‰ã‚Œã‚‹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã«ãªã‚Šã¾ã™ã€‚ + <code class="directive"><a href="#ssiundefinedecho">SSIUndefinedEcho</a></code> + ディレクティブを上書ãã—ã¾ã™ã€‚</dd> + + <dt><code>errmsg</code></dt> + <dd>ã“ã®å€¤ãŒã€ãƒ‰ã‚ュメントã®è§£æžä¸ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ãŸæ™‚ã« + クライアントã«é€ä¿¡ã•れるメッセージã«ãªã‚Šã¾ã™ã€‚ + <code class="directive"><a href="#ssierrormsg">SSIErrorMsg</a></code> + ディレクティブを上書ãã—ã¾ã™ã€‚</dd> + + <dt><code>sizefmt</code></dt> + <dd>ã“ã®å€¤ã¯ã€ãƒ•ァイルã®ã‚µã‚¤ã‚ºã‚’表示ã™ã‚‹éš›ã«ä½¿ç”¨ã™ã‚‹ + フォーマットをè¨å®šã—ã¾ã™ã€‚値㯠ãƒã‚¤ãƒˆã‚«ã‚¦ãƒ³ãƒˆã® + <code>bytes</code>ã‹ã€Kb ã‚„ Mb を優先的ã«ä½¿ç”¨ã™ã‚‹ + <code>abbrec</code> (例ãˆã° 1024 ãƒã‚¤ãƒˆã¯ "1K" ã¨è¡¨ç¤ºã•れã¾ã™) + ã§ã™ã€‚</dd> + + <dt><code>timefmt</code></dt> + <dd>ã“ã®å€¤ã¯ <code>strftime(3)</code> ライブラリルーãƒãƒ³ãŒ + 日時をプリントã™ã‚‹éš›ã«ç”¨ã„られã¾ã™ã€‚</dd> + </dl> + + + <h3><a name="element.echo" id="element.echo">echo è¦ç´ </a></h3> + <p>ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ä»¥ä¸‹ã§å®šç¾©ã•れã¦ã„ã‚‹ <a href="#includevars">include + 変数</a> を表示ã—ã¾ã™ã€‚変数ãŒè¨å®šã•れã¦ã„ãªã„å ´åˆã¯ <code class="directive"><a href="#ssiundefinedecho">SSIUndefinedEcho</a></code> ディレクティブ㧠+ 決定ã•ã‚Œã‚‹çµæžœã¨ãªã‚Šã¾ã™ã€‚日付ã¯ãã®æ™‚点ã§ã® <code>timefmt</code> ã«å¾“ã£ã¦ + 表示ã•れã¾ã™ã€‚å±žæ€§ã¯æ¬¡ã®é€šã‚Šã§ã™ã€‚</p> + + <dl> + <dt><code>var</code></dt> + <dd>値ã¯è¡¨ç¤ºã™ã‚‹å¤‰æ•°ã®åå‰ã§ã™ã€‚</dd> + + <dt><code>encoding</code></dt> + <dd><p>変数を出力ã™ã‚‹å‰ã«ã€å¤‰æ•°ä¸ã®ç‰¹åˆ¥æ–‡å—ã‚’ã©ã®ã‚ˆã†ã«ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã™ã‚‹ã‹ã‚’ + 指定ã—ã¾ã™ã€‚<code>none</code> ã«è¨å®šã•れã¦ã„ã‚‹ã¨ã€ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã¯è¡Œãªã‚れã¾ã›ã‚“。 + <code>url</code> ã«è¨å®šã•れã¦ã„ã‚‹ã¨ã€URL エンコード (%-エンコードã¨ã‚‚ + 呼ã°ã‚Œã¦ã„ã¾ã™ã€‚ã“れã¯ãƒªãƒ³ã‚¯ç‰ã® URL ã®ä½¿ç”¨ã«é©åˆ‡ã§ã™) ㌠+ 行ãªã‚れã¾ã™ã€‚<code>echo</code> è¦ç´ ã®é–‹å§‹æ™‚ã¯ã€ãƒ‡ãƒ•ォルト㯠+ <code>entity</code> ã«è¨å®šã•れã¦ã„ã¾ã™ã€‚ã“れã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ + (段è½ã‚„テã‚ストãªã©ã®ãƒ–ãƒãƒƒã‚¯ãƒ¬ãƒ™ãƒ«ã® HTML エレメントã®ã‚³ãƒ³ãƒ†ã‚スト㫠+ é©ã—ã¦ã„ã¾ã™) を行ãªã„ã¾ã™ã€‚ã“れ㯠<code>encoding</code> 属性 + ã‚’åŠ ãˆã‚‹ã“ã¨ã§å¤‰æ›´ã§ãã¾ã™ã€‚å¤‰æ›´ã¯æ¬¡ã® <code>encoding</code> 属性ã‹ã€ + è¦ç´ ã®çµ‚了ã¾ã§åŠ¹åŠ›ã‚’æŒã¡ã¾ã™ã€‚</p> + + <p><code>encoding</code> 属性ã¯ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã®å¤‰æ›´ã‚’ã—ãŸã„ <code>var</code> + ã®<em>å‰ã«</em> ã‚ã‚‹å¿…è¦ãŒã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + ã¾ãŸã€ISO-8859-1 エンコーディング㧠+ 定義ã•れã¦ã„ã‚‹ç‰¹åˆ¥ãªæ–‡å—ã ã‘ãŒã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•れã¾ã™ã€‚ + åˆ¥ã®æ–‡å—ã®ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã®å ´åˆã¯ã€ã“ã®ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã¯ + 望ã¿ã®çµæžœã«ãªã‚‰ãªã„ã‹ã‚‚ã—れã¾ã›ã‚“。</p> + + <div class="warning"> + クãƒã‚¹ã‚µã‚¤ãƒˆã‚¹ã‚¯ãƒªãƒ—ティングã®å•題をé¿ã‘ã‚‹ãŸã‚ã«ã€ + <em>常ã«</em>ユーザã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ã‚’エンコードã™ã¹ãã§ã™ã€‚ + </div> + </dd> + </dl> + + + <h3><a name="element.exec" id="element.exec">exec è¦ç´ </a></h3> + <p><code>exec</code> ã‚³ãƒžãƒ³ãƒ‰ã¯æŒ‡å®šã•れãŸã‚·ã‚§ãƒ«ã‚³ãƒžãƒ³ãƒ‰ã‚„ CGI スクリプトを + 実行ã—ã¾ã™ã€‚<code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code> ãŒã‚µãƒ¼ãƒã«çµ„ã¿è¾¼ã¾ã‚Œã¦ã„ã‚‹ã„ãªã‘れ㰠+ ãªã‚Šã¾ã›ã‚“。<code class="directive"><a href="../mod/core.html#option">Option</a></code> + <code>IncludesNOEXEC</code> ã¯ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’無効ã«ã—ã¾ã™ã€‚ + 使用å¯èƒ½ãªå±žæ€§ã¯æ¬¡ã®é€šã‚Šã§ã™ã€‚</p> + + <dl> + <dt><code>cgi</code></dt> + <dd><p>値㯠(%-エンコードã•れãŸ) URL を指定ã—ã¾ã™ã€‚パス㌠+ スラッシュ (/) ã§å§‹ã¾ã‚‰ãªã„ã¨ãã¯ã€ãƒ‰ã‚ュメントã‹ã‚‰ã® + 相対パスã¨ã—ã¦æ‰±ã‚れã¾ã™ã€‚ã“ã®ãƒ‘スã§å‚ç…§ã•れã¦ã„るドã‚ュメント㯠+ サーãƒãŒ CGI スクリプトã¨ã—ã¦æ‰±ã£ã¦ã„ãªãã¦ã‚‚ CGI スクリプトã¨ã—㦠+ èµ·å‹•ã•れã¾ã™ã€‚ãŸã ã—ã€ã‚¹ã‚¯ãƒªãƒ—トã®ã‚るディレクトリã§ã¯ + (<code class="directive"><a href="../mod/mod_alias.html#scriptalias">ScriptAlias</a></code> + ã‚„ <code class="directive"><a href="../mod/core.html#option">Option</a></code> <code>ExecCGI</code> + ã«ã‚ˆã£ã¦) CGI スクリプトã®ä½¿ç”¨ãŒè¨±å¯ã•れã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚</p> + + <p>CGI スクリプトã«ã¯ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‹ã‚‰ã®å…ƒã€…ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã® + <code>PATH_INFO</code> ã¨ã‚¯ã‚¨ãƒªãƒ¼æ–‡å—列 (<code>QUERY_STRING</code>) ãŒæ¸¡ã•れã¾ã™ã€‚ + ã“れら㯠URL パスã¨ã—ã¦ç‰¹å®š<em>ã§ããªã„</em>ã‚‚ã®ã§ã™ã€‚ + ã‚¹ã‚¯ãƒªãƒ—ãƒˆã¯æ¨™æº– <a href="mod_cgi.html">CGI</a> 環境ã«åŠ ãˆã¦ã€include 変数を + 使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚</p> + + <div class="example"><h3>例</h3><p><code> + <!--#exec cgi="/cgi-bin/example.cgi" --> + </code></p></div> + + <p>スクリプトãŒã€å‡ºåŠ›ã®ä»£ã‚り㫠<code>Location:</code> ヘッダを返ã™ã¨ã€ + HTML ã®ã‚¢ãƒ³ã‚«ãƒ¼ <span class="transnote">(<em>訳注:</em> リンク)</span> ã«å¤‰æ›ã•れã¾ã™ã€‚</p> + + <p><code>exec cgi</code> よりも〠+ <code><a href="#includevirtual">include virtual</a></code> + ã®æ–¹ã‚’使ã†ã‚ˆã†ã«ã—ã¦ãã ã•ã„。特ã«ã€CGI ã¸ã®è¿½åŠ ã®å¼•æ•°ã‚’ + クエリー文å—列を使ã£ã¦æ¸¡ã™ã“ã¨ã¯ <code>exec cgi</code> 㯠+ ã§ãã¾ã›ã‚“ãŒã€<code>include virtual</code> ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ã—㦠+ å¯èƒ½ã§ã™ã€‚</p> + + <div class="example"><p><code> + <!--#include virtual="/cgi-bin/example.cgi?argument=value" --> + </code></p></div> + </dd> + + <dt><code>cmd</code></dt> + <dd><p>サーãƒã¯æŒ‡å®šã•ã‚ŒãŸæ–‡å—列を <code>/bin/sh</code> を使ã£ã¦ + 実行ã—ã¾ã™ã€‚コマンドã¯é€šå¸¸ã® CGI 変数ã«åŠ ãˆã¦ <a href="#includevars">include 変数</a>も使ã†ã“ã¨ãŒã§ãã¾ã™ã€‚</p> + + <p>ã»ã¨ã‚“ã©ã®å ´åˆã€<code><a href="#includevirtual">#include + virtual</a></code> ã‚’ä½¿ã†æ–¹ãŒ <code>#exec cgi</code> ã‚„ <code>#exec + cmd</code> を使ã†ã‚ˆã‚Šã‚‚良ã„ã§ã™ã€‚å‰è€… (<code>#include virtual</code>) + ã¯æ¨™æº–ã® Apache ã®ã‚µãƒ–リクエスト機構を使ã£ã¦ãƒ•ァイルやスクリプト㮠+ 出力をå–り込ã¿ã¾ã™ã€‚ + ã“ã¡ã‚‰ã®æ–¹ãŒã‚ˆãテストã•れメンテナンスã•ã‚ŒãŸæ–¹æ³•ã§ã™ã€‚</p> + + <p>ã•らã«ã€Win32 ã®ã‚ˆã†ãªã„ãã¤ã‹ã®ãƒ—ラットフォームやã€<a href="../suexec.html">suexec</a> を使ã£ã¦ã„ã‚‹ unix ã§ã¯ã€ + <code>exec</code> ディレクティブã®ã‚³ãƒžãƒ³ãƒ‰ã« + 引数を渡ã—ãŸã‚Šã€ã‚³ãƒžãƒ³ãƒ‰ã«ç©ºç™½ã‚’入れるã“ã¨ã¯ã§ãã¾ã›ã‚“。 + ã§ã™ã‹ã‚‰ã€ä»¥ä¸‹ã®ã‚‚ã®ã¯ unix ã® suexec ã§ãªã„è¨å®šã§ã¯å‹•作ã—ã¾ã™ãŒã€ + Win32 ã‚„ suexec を使ã£ã¦ã„ã‚‹ unix ã§ã¯æœŸå¾…ã—ãŸçµæžœã«ã¯ãªã‚Šã¾ã›ã‚“:</p> + + <div class="example"><p><code> + <!--#exec cmd="perl /path/to/perlscript arg1 arg2" --> + </code></p></div> + </dd> + </dl> + + + <h3><a name="element.fsize" id="element.fsize">fsize è¦ç´ </a></h3> + <p>ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯æŒ‡å®šã•れãŸãƒ•ァイルã®å¤§ãã•ã‚’ <code>sizefmt</code> ã® + æ›¸å¼æŒ‡å®šã«åŸºã¥ã„ã¦å‡ºåŠ›ã—ã¾ã™ã€‚å±žæ€§ã¯æ¬¡ã®é€šã‚Šã§ã™ã€‚</p> + + <dl> + <dt><code>file</code></dt> + <dd>値ã¯è§£æžã•れã¦ã„るドã‚ュメントã®å˜åœ¨ã™ã‚‹ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‹ã‚‰ã® + 相対パスã§ã™ã€‚</dd> + + <dt><code>virtual</code></dt> + <dd> 値㯠(% エンコードã•れãŸ) URL-path ã§ã™ã€‚スラッシュ (/) ã§ + å§‹ã¾ã‚‰ãªã„ã¨ãã¯ãƒ‰ã‚ュメントã‹ã‚‰ã®ç›¸å¯¾ãƒ‘スã¨ã—ã¦æ‰±ã‚れã¾ã™ã€‚ + CGI ã®å‡ºåŠ›ã®ã‚µã‚¤ã‚ºã¯ãƒ—リント<em>ã•れã¾ã›ã‚“</em>。CGI + スクリプト自体ã®ã‚µã‚¤ã‚ºãŒãƒ—リントã•れるã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。</dd> + </dl> + + + <h3><a name="element.flastmod" id="element.flastmod">flastmod è¦ç´ </a></h3> + <p>ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯æŒ‡å®šã•れãŸãƒ•ã‚¡ã‚¤ãƒ«ã®æœ€çµ‚ä¿®æ£æ™‚刻を + <code>timefmt</code> æ›¸å¼æŒ‡å®šã«å¾“ã£ã¦è¡¨ç¤ºã—ã¾ã™ã€‚ + 指定å¯èƒ½ãªå±žæ€§ã¯ <code>fsize</code> コマンドã¨åŒã˜ã§ã™ã€‚</p> + + + <h3><a name="element.include" id="element.include">include è¦ç´ </a></h3> + <p>ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯åˆ¥ã®æ–‡æ›¸ã‚„ファイルã®ãƒ†ã‚ストを解æžã—ã¦ã„るファイル㫠+ 挿入ã—ã¾ã™ã€‚挿入ã•れるファイルã¯ã‚¢ã‚¯ã‚»ã‚¹åˆ¶å¾¡ã®ç®¡ç†ä¸‹ã«ã‚りã¾ã™ã€‚ + è§£æžã—ã¦ã„るファイルã®å˜åœ¨ã™ã‚‹ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã« + <a href="core.html#options">Option</a> <code>IncludesNOEXEC</code> + ãŒè¨å®šã•れã¦ã„ã‚‹å ´åˆã€text <a class="glossarylink" href="../glossary.html#mime-type" title="用語集をå‚ç…§">MIME タイプ</a> + (<code>text/plain</code>, <code>text/html</code> ç‰) + ã®ãƒ‰ã‚ュメントã®ã¿ã‚¤ãƒ³ã‚¯ãƒ«ãƒ¼ãƒ‰ãŒè¡Œãªã‚れã¾ã™ã€‚ + ãã®ä»–ã®å ´åˆã¯ã€ã‚¯ã‚¨ãƒªãƒ¼æ–‡å—列もå«ã‚ã€ã‚³ãƒžãƒ³ãƒ‰ã§æŒ‡å®šã•れ㟠+ 完全㪠URL を使ã£ã¦æ™®é€šã« CGI スクリプトãŒå‘¼ã³å‡ºã•れã¾ã™ã€‚</p> + + <p>å±žæ€§ãŒæ–‡æ›¸ã®ä½ç½®ã‚’指定ã—ã¾ã™ã€‚include コマンドã«ä¸Žãˆã‚‰ã‚ŒãŸãれãžã‚Œã® + 属性ã«å¯¾ã—ã¦æŒ¿å…¥ä½œæ¥ãŒè¡Œãªã‚れã¾ã™ã€‚有効ãªå±žæ€§ã¯æ¬¡ã®é€šã‚Šã§ã™ã€‚</p> + + <dl> + <dt><code>file</code></dt> + <dd>値ã¯è§£æžã•れã¦ã„るドã‚ュメントã®å˜åœ¨ã™ã‚‹ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‹ã‚‰ã® + 相対パスã§ã™ã€‚ + <code>../</code> ã‚’å«ã‚“ã§ã„ãŸã‚Šã€çµ¶å¯¾ãƒ‘スを指定ã—ãŸã‚Šã¯ã§ãã¾ã›ã‚“。 + ã§ã™ã‹ã‚‰ã€ãƒ‰ã‚ュメントルートã®å¤–ã«ã‚るファイルやã€ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªæ§‹é€ ã§ + 上ä½ã«ã‚るファイルを挿入ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + 常ã«ã“ã®å±žæ€§ã‚ˆã‚Šã¯ã€<code>virtual</code> 属性を使ã†ã‚ˆã†ã«ã—ã¦ãã ã•ã„。 + </dd> + + <dt><code><a id="includevirtual" name="includevirtual">virtual</a></code></dt> + <dd><p>値ã¯è§£æžã•れã¦ã„るドã‚ュメントã‹ã‚‰ã® (% エンコードã•れãŸ) URL + ã§ã™ã€‚URL ã«ã¯ã‚¹ã‚ームやホストåã‚’å«ã‚ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。パスã¨ã€ + ã‚‚ã—ã‚れã°ã‚¯ã‚¨ãƒªãƒ¼æ–‡å—列を指定ã§ãã‚‹ã ã‘ã§ã™ã€‚スラッシュ (/) ã‹ã‚‰ + å§‹ã¾ã‚‰ãªã„å ´åˆã¯ã€ãƒ‰ã‚ュメントã‹ã‚‰ã®ç›¸å¯¾ãƒ‘スã¨ã—ã¦æ‰±ã‚れã¾ã™ã€‚</p> + + <p>URL ã¯å±žæ€§ã‹ã‚‰ä½œã‚‰ã‚Œã€ãã® URL をクライアントãŒã‚¢ã‚¯ã‚»ã‚¹ã—ãŸã¨ãã« + 出力ã•れる内容ãŒè§£æžå¾Œã®å‡ºåŠ›ã«å«ã‚られã¾ã™ã€‚ã§ã™ã‹ã‚‰ã€æŒ¿å…¥ã•れる + ファイルã¯å…¥ã‚Œåæ§‹é€ ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚</p> + + <p>指定ã•れ㟠URL ㌠CGI プãƒã‚°ãƒ©ãƒ ã§ã‚ã£ãŸå ´åˆã¯ã€ + プãƒã‚°ãƒ©ãƒ ãŒå®Ÿè¡Œã•れã€ãã®å‡ºåŠ›ãŒè§£æžã—ã¦ã„るファイルä¸ã® + ディレクティブãŒã‚ã£ãŸä½ç½®ã«æŒ¿å…¥ã•れã¾ã™ã€‚CGI ã® url ã« + クエリー URL を入れるã“ã¨ã‚‚ã§ãã¾ã™ã€‚</p> + + <div class="example"><p><code> + <!--#include virtual="/cgi-bin/example.cgi?argument=value" --> + </code></p></div> + + <p>HTML ドã‚ュメント㫠CGI プãƒã‚°ãƒ©ãƒ ã®å‡ºåŠ›ã‚’å«ã‚る方法ã¨ã—ã¦ã¯ã€ + <code>include virtual</code> ã®æ–¹ãŒ <code>exec cgi</code> よりも + 好ã¾ã—ã„æ–¹æ³•ã§ã™ã€‚</p> + + <p><code class="directive"><a href="../mod/mod_request.html#keptbodysize">KeptBodySize</a></code> + ディレクティブãŒè¨å®šã•れã¦ã„ã¦ã€ã‹ã¤ã€ã“ã®å¯¾è±¡ãƒ•ァイル㌠+ <span class="transnote">(<em>訳注:</em> POST リクエストを)</span>å—ã‘入れã§ãã‚‹ãªã‚‰ã€ + POST リクエストをå—ã‘å–ã£ã¦ã‚µãƒ–リクエストを発行ã™ã‚‹éš›ã«ã‚‚ + POST ãƒªã‚¯ã‚¨ã‚¹ãƒˆãŒæ¸¡ã•れã¾ã™ã€‚ + ã“ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒ†ã‚£ãƒ–ãŒè¨å®šã•れã¦ã„ãªã„å ´åˆã¯ã€ + サブリクエスト㯠GET リクエストã¨ã—ã¦å‡¦ç†ã•れã¾ã™ã€‚</p> + + </dd> + </dl> + + + <h3><a name="element.printenv" id="element.printenv">printenv è¦ç´ </a></h3> + <p>ã“れã¯ã€å˜åœ¨ã™ã‚‹ã™ã¹ã¦ã®å¤‰æ•°ã¨ãã®å€¤ã‚’表示ã—ã¾ã™ã€‚Apache 1.3.12 ã‹ã‚‰ã€ + ç‰¹åˆ¥ãªæ–‡å—ã¯å‡ºåŠ›ã•れるå‰ã«ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ (詳細㯠<a href="#element.echo"><code>echo</code></a> è¦ç´ ã‚’å‚ç…§) + ã•れるよã†ã«ãªã‚Šã¾ã—ãŸã€‚属性ã¯ã‚りã¾ã›ã‚“。</p> + + <div class="example"><h3>例</h3><p><code> + <!--#printenv --> + </code></p></div> + + + <h3><a name="element.set" id="element.set">set è¦ç´ </a></h3> + <p>ã“れã¯å¤‰æ•°ã®å€¤ã‚’è¨å®šã—ã¾ã™ã€‚å±žæ€§ã¯æ¬¡ã®é€šã‚Šã§ã™ã€‚</p> + + <dl> + <dt><code>var</code></dt> + <dd>è¨å®šã™ã‚‹å¤‰æ•°ã®åå‰ã€‚</dd> + + <dt><code>value</code></dt> + <dd>変数ã«è¨å®šã™ã‚‹å€¤ã€‚</dd> + </dl> + + <div class="example"><h3>例</h3><p><code> + <!--#set var="category" value="help" --> + </code></p></div> + +</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="section"> +<h2><a name="includevars" id="includevars">Include 変数</a></h2> + + + <p>標準 CGI 環境ã®å¤‰æ•°ã«åŠ ãˆã¦ã€<code>echo</code> コマンドや〠+ <code>if</code> ã‚„ <code>elif</code>, ãれã«ãƒ‰ã‚ュメントã‹ã‚‰å‘¼ã³å‡ºã•れる + ã™ã¹ã¦ã®ãƒ—ãƒã‚°ãƒ©ãƒ ã‹ã‚‰ä½¿ç”¨ã§ãる変数ãŒã‚りã¾ã™ã€‚</p> + + <dl> + <dt><code>DATE_GMT</code></dt> + <dd>グリニッジ標準時ã«ã‚ˆã‚‹ç¾åœ¨æ™‚刻。</dd> + + <dt><code>DATE_LOCAL</code></dt> + <dd>ãƒãƒ¼ã‚«ãƒ«ã®æ¨™æº–時ã«ã‚ˆã‚‹ç¾åœ¨æ™‚刻。</dd> + + <dt><code>DOCUMENT_NAME</code></dt> + <dd>ユーザãŒãƒªã‚¯ã‚¨ã‚¹ãƒˆã—㟠(ディレクトリを除ã„ãŸ) ファイルå。</dd> + + <dt><code>DOCUMENT_URI</code></dt> + <dd>ユーザãŒãƒªã‚¯ã‚¨ã‚¹ãƒˆã—㟠(% エンコードã•れãŸ) URL-path。 + 挿入ファイルãŒå…¥ã‚Œåã«ãªã£ã¦ã„ã‚‹å ´åˆã¯ã€è§£æžã•れã¦ã„ã‚‹ + ドã‚ュメント㮠URL ã§ã¯<em>ãªã„</em>ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。</dd> + + <dt><code>LAST_MODIFIED</code></dt> + <dd>ユーザãŒãƒªã‚¯ã‚¨ã‚¹ãƒˆã—ãŸãƒ‰ã‚ãƒ¥ãƒ¡ãƒ³ãƒˆã®æœ€çµ‚ä¿®æ£æ™‚刻。</dd> + + <dt><code>QUERY_STRING_UNESCAPED</code></dt> + <dd>クエリー文å—列ãŒã‚ã‚‹å ´åˆã€ã“ã®å¤‰æ•°ã«ã¯ (%-デコードã•れãŸ) + クエリー文å—列ãŒä»£å…¥ã•れã¦ã„ã¦ã€shell ã§ä½¿ç”¨ã§ãるよã†ã« + <em>エスケープ</em>ã•れã¦ã„ã¾ã™ (<code>&</code> + ã¨ã„ã£ãŸç‰¹æ®Šæ–‡å—ã«ã¯ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ãŒç›´å‰ã«ç½®ã‹ã‚Œã¾ã™)。</dd> + </dl> +</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="section"> +<h2><a name="substitution" id="substitution">変数置æ›</a></h2> + + <p>変数置æ›ã¯ãŸã„ã¦ã„ã®å ´åˆ SSI ディレクティブã®å¼•æ•°ã¨ã—ã¦å¦¥å½“ãªå ´æ‰€ã«ã‚ã‚‹ + 引用符ã§å›²ã¾ã‚ŒãŸæ–‡å—列ä¸ã§è¡Œãªã‚れã¾ã™ã€‚ã“れã«è©²å½“ã™ã‚‹ã‚‚ã®ã«ã¯ã€ + <code>config</code>, + <code>exec</code>, <code>flastmod</code>, <code>fsize</code>, + <code>include</code>, <code>echo</code>, <code>set</code> ã® + å„ディレクティブã¨ã€æ¡ä»¶åˆ†å²ç”¨ã®ã‚ªãƒšãƒ¬ãƒ¼ã‚¿ã¸ã®å¼•æ•°ãŒã‚りã¾ã™ã€‚ + ドル記å·ã¯ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ã‚’使ã†ã“ã¨ã§ä½¿ã†ã“ã¨ãŒã§ãã¾ã™:</p> + + <div class="example"><p><code> + <!--#if expr="$a = \$test" --> + </code></p></div> + + <p>変数åã¨ã—ã¦ã¿ãªã•れる文å—列ã®ä¸ã§å¤‰æ•°ã¸ã®å‚ç…§ã‚’ç½®æ›ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã¨ãã¯ã€ + シェルã§ã®å¤‰æ•°ç½®æ›ã®ã‚ˆã†ã«ã€ä¸æ‹¬å¼§ã§æ‹¬ã‚‹ã“ã¨ã§åŒºåˆ¥ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™:</p> + + <div class="example"><p><code> + <!--#set var="Zed" value="${REMOTE_HOST}_${REQUEST_METHOD}" --> + </code></p></div> + + <p>ã“ã®ä¾‹ã§ã¯ã€<code>REMOTE_HOST</code> ㌠+ "<code>X</code>" ã§ <code>REQUEST_METHOD</code> ㌠+ "<code>Y</code>" ã®ã¨ãã«å¤‰æ•° <code>Zed</code> ã‚’ "<code>X_Y</code>" + ã«è¨å®šã—ã¾ã™ã€‚</p> + + <p>以下ã®ä¾‹ã§ã¯ã€<code>DOCUMENT_URI</code> ㌠<code>/foo/file.html</code> + ã®ã¨ãã« "in foo" ã‚’ã€<code>/bar/file.html</code> ã®ã¨ãã« "in bar" を〠+ ã©ã¡ã‚‰ã§ã‚‚ãªã„ã¨ãã«ã¯ "in neither" を表示ã—ã¾ã™ã€‚</p> + + <div class="example"><p><code> + <!--#if expr='"$DOCUMENT_URI" = "/foo/file.html"' --><br /> + <span class="indent"> + in foo<br /> + </span> + <!--#elif expr='"$DOCUMENT_URI" = "/bar/file.html"' --><br /> + <span class="indent"> + in bar<br /> + </span> + <!--#else --><br /> + <span class="indent"> + in neither<br /> + </span> + <!--#endif --> + </code></p></div> +</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="section"> +<h2><a name="flowctrl" id="flowctrl">フãƒãƒ¼åˆ¶å¾¡è¦ç´ </a></h2> + + + <p>基本的ãªãƒ•ãƒãƒ¼ã‚³ãƒ³ãƒˆãƒãƒ¼ãƒ«è¦ç´ ã¯æ¬¡ã®é€šã‚Šã§ã™ã€‚</p> + + <div class="example"><p><code> + <!--#if expr="<var>test_condition</var>" --><br /> + <!--#elif expr="<var>test_condition</var>" --><br /> + <!--#else --><br /> + <!--#endif --> + </code></p></div> + + <p><code>if</code> è¦ç´ ã¯ãƒ—ãƒã‚°ãƒ©ãƒŸãƒ³ã‚°è¨€èªžã® + if æ–‡ã¨åŒã˜ã‚ˆã†ã«å‹•作ã—ã¾ã™ã€‚æ¡ä»¶ãŒè©•価ã•れã€çµæžœãŒçœŸã§ã‚ã‚Œã°æ¬¡ã® + <code>elif</code> ã‹ <code>else</code> ã‹ <code>endif</code> + è¦ç´ ã¾ã§ã®æ–‡å—列ãŒå‡ºåŠ›ã«æŒ¿å…¥ã•れã¾ã™ã€‚</p> + + <p><code>elif</code> ã‚„ <code>else</code> 文㯠<var>test_condition</var> + ãŒå½ã®ã¨ãã«ãƒ†ã‚ã‚¹ãƒˆã‚’å‡ºåŠ›ã«æŒ¿å…¥ã™ã‚‹ãŸã‚ã«ä½¿ã‚れã¾ã™ã€‚ + ã“れらã®è¦ç´ ã¯ã‚ã£ã¦ã‚‚ãªãã¦ã‚‚æ§‹ã„ã¾ã›ã‚“。</p> + + <p><code>endif</code> è¦ç´ 㯠<code>if</code> + è¦ç´ を終了ã•ã›ã¾ã™ã€‚ã“ã®è¦ç´ ã¯å¿…é ˆã§ã™ã€‚</p> + + <p><var>test_condition</var> ã¯ä»¥ä¸‹ã®ã©ã‚Œã‹ã§ã™:</p> + + <dl> + <dt><code><var>string</var></code></dt> + <dd><var>string</var> ãŒç©ºã§ãªã„å ´åˆã«çœŸã§ã™</dd> + + <dt><code><var>-A string</var></code></dt> + <dd><p><span class="transnote">(<em>訳注:</em> httpd ã®)</span>è¨å®šã‚’検査ã—ã¦ã€ + æ–‡å—åˆ—ã§æŒ‡å®šã—㟠URL ã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã‚‹å ´åˆ true ã§ã€ + ãã†ã§ãªã‘れ㰠false ã«ãªã‚Šã¾ã™ã€‚ + <code class="directive">SSIAccessEnable</code> ãŒæœ‰åйã®ã¨ãã«ã®ã¿ + ã“ã®æ¤œæŸ»ã¯è¡Œã‚れã¾ã™ã€‚ + 承èªã•れã¦ã„ãªã„ユーザã‹ã‚‰ã¯éš ã—ã¦ãŠããŸã„ URL ã«ã¤ã„ã¦ã®æƒ…å ±ã€ + ãŸã¨ãˆã° URL ã¸ã®ãƒªãƒ³ã‚¯ãªã©ãŒã‚ã‚‹å ´åˆã«ã€ä¾¿åˆ©ã§ã™ã€‚ + 検査ã§ã¯ URL ã¸ã‚¢ã‚¯ã‚»ã‚¹ã§ãã‚‹ã‹ã®æ¨©é™ã®ã¿ãŒè¡Œã‚れã€URL + ãŒå˜åœ¨ã™ã‚‹ã‹ã©ã†ã‹ã«ã¤ã„ã¦ã¯æ¤œæŸ»ã•れãªã„ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。</p> + + <div class="example"><h3>Example</h3><p><code> + <!--#if expr="-A /private" --><br /> + <span class="indent"> + Click <a href="/private">here</a> to access private + information.<br /> + </span> + <!--#endif --> + </code></p></div> + </dd> + + <dt><code><var>string1</var> = <var>string2</var><br /> + <var>string1</var> == <var>string2</var><br /> + <var>string1</var> != <var>string2</var></code></dt> + + <dd><p><var>string1</var> 㨠<var>string2</var> を比較ã—ã¾ã™ã€‚ + <var>string2</var> ㌠<code>/<var>string</var>/</code> + ã¨ã„ã†å½¢å¼ã§ã‚れã°ã€æ£è¦è¡¨ç¾ã¨ã—ã¦æ¯”較ã•れã¾ã™ã€‚æ£è¦è¡¨ç¾ã¯ + <a href="http://www.pcre.org">PCRE</a> エンジンã§å®Ÿè£…ã•れã¦ã„ã¦ã€ + <a href="http://www.perl.com">perl 5</a> ã¨åŒã˜æ§‹æ–‡ã‚’使用ã—ã¾ã™ã€‚ + <code>==</code> ã¯å˜ã« <code>=</code> ã®åˆ¥åã§ã€ã¾ã£ãŸãåŒã˜å‹•作を + ã—ã¾ã™ã€‚</p> + + <p>æ£ã®ãƒžãƒƒãƒãƒ³ã‚° (<code>=</code> ã¾ãŸã¯ <code>==</code>) ã®å ´åˆã¯ã€ + æ£è¦è¡¨ç¾ã§ã‚°ãƒ«ãƒ¼ãƒ—分ã‘ã•れãŸãƒ‘ーツをã‚ャプãƒãƒ£ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + ã‚ャプãƒãƒ£ã•れãŸéƒ¨åˆ†ã¯ç‰¹æ®Šå¤‰æ•° <code>$1</code> .. <code>$9</code> + ã«æ ¼ç´ã•れã¾ã™ã€‚</p> + + <div class="example"><h3>例</h3><p><code> + <!--#if expr="$QUERY_STRING = /^sid=([a-zA-Z0-9]+)/" --><br /> + <span class="indent"> + <!--#set var="session" value="$1" --><br /> + </span> + <!--#endif --> + </code></p></div> + </dd> + + <dt><code><var>string1</var> < <var>string2</var><br /> + <var>string1</var> <= <var>string2</var><br /> + <var>string1</var> > <var>string2</var><br /> + <var>string1</var> >= <var>string2</var></code></dt> + + <dd><var>string1</var> 㨠<var>string2</var> を比較ã—ã¾ã™ã€‚ + <em>æ–‡å—列ã¨ã—ã¦</em>比較ã•れる (<code>strcmp(3)</code> を使用) + ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。ã§ã™ã‹ã‚‰ã€æ–‡å—列 "100" 㯠"20" + よりもå°ã•ã„ã“ã¨ã«ãªã‚Šã¾ã™ã€‚</dd> + + <dt><code>( <var>test_condition</var> )</code></dt> + <dd><var>test_condition</var> ãŒçœŸã®ã¨ãã€çœŸ</dd> + + <dt><code>! <var>test_condition</var></code></dt> + <dd><var>test_condition</var> ãŒå½ã®ã¨ãã€çœŸ</dd> + + <dt><code><var>test_condition1</var> && + <var>test_condition2</var></code></dt> + <dd><var>test_condition1</var> ã‹ã¤ + <var>test_condition2</var> ãŒçœŸã®ã¨ãã€çœŸ</dd> + + <dt><code><var>test_condition1</var> || + <var>test_condition2</var></code></dt> + <dd><var>test_condition1</var> ã¾ãŸã¯ + <var>test_condition2</var> ãŒçœŸã®ã¨ãã€çœŸ</dd> + </dl> + + <p>"<em>=</em>" 㨠"<em>!=</em>" ã®æ–¹ãŒ "<em>&&</em>" より + ãã¤ãæŸç¸›ã—ã¾ã™ã€‚"<em>!</em>" ã®æŸç¸›ãŒä¸€ç•ªãã¤ããªã£ã¦ã„ã¾ã™ã€‚ + ã§ã™ã‹ã‚‰ä»¥ä¸‹ã®äºŒã¤ã¯ç‰ä¾¡ã§ã™:</p> + + <div class="example"><p><code> + <!--#if expr="$a = test1 && $b = test2" --><br /> + <!--#if expr="($a = test1) && ($b = test2)" --> + </code></p></div> + + <p>真å½å€¤ã‚ªãƒšãƒ¬ãƒ¼ã‚¿ <code>&&</code> 㨠<code>||</code> + ã¯åŒã˜å„ªå…ˆåº¦ã§ã™ã€‚ + ã“れらã®ã‚ªãƒšãƒ¬ãƒ¼ã‚¿ã§ä¸€æ–¹ã«ã‚ˆã‚Šå¼·ã„優先度をã¤ã‘ãŸã„å ´åˆã«ã¯ã€ + 括弧を使ã†å¿…è¦ãŒã‚りã¾ã™ã€‚</p> + + <p>変数やオペレータã¨ã—ã¦èªè˜ã•れãªã„ã‚‚ã®ã¯ã™ã¹ã¦æ–‡å—列ã¨ã—㦠+ 扱ã‚れã¾ã™ã€‚æ–‡å—列ã¯å¼•用符ã§å›²ã‚€ã“ã¨ã‚‚ã§ãã¾ã™: <code>'string'</code> + ã®ã‚ˆã†ã«ã€‚引用符ã§å›²ã¾ã‚Œã¦ã„ãªã„æ–‡å—列ã«ã¯ç©ºç™½ (スペースã¨ã‚¿ãƒ–) + ã‚’å«ã‚ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。ãれらã¯å¤‰æ•°ãªã©ã®å¥ã‚’分離ã™ã‚‹ãŸã‚ã« + 使ã‚れã¦ã„ã‚‹ã‹ã‚‰ã§ã™ã€‚è¤‡æ•°ã®æ–‡å—列ãŒç¶šã„ã¦ã„ã‚‹ã¨ãã¯ã€ + 空白を間ã«å…¥ã‚Œã¦ä¸€ã¤ã«ãã£ã¤ã‘られã¾ã™ã€‚ã§ã™ã‹ã‚‰ã€</p> + + <div class="example"><p><code><var>string1</var> <var>string2</var></code> 㯠<code><var>string1</var> <var>string2</var></code> ã«ãªã‚Šã¾ã™ã€‚<br /> + <br /> + ã¾ãŸã€<br /> + <br /> + <code>'<var>string1</var> <var>string2</var>'</code> 㯠<code><var>string1</var> <var>string2</var></code> + ã«ãªã‚Šã¾ã™ã€‚</p></div> + + <div class="note"><h3>真å½å€¤è¡¨ç¾ã®æœ€é©åŒ–</h3> + <p>å¼ãŒã‚‚ã£ã¨è¤‡é›‘ã«ãªã‚Šã€å‡¦ç†ã®é€Ÿåº¦ä½Žä¸‹ãŒé¡•è‘—ã«ãªã£ãŸå ´åˆã¯ã€ + 評価ルールã«å¾“ã£ã¦æœ€é©åŒ–ã—ã¦ã¿ã‚‹ã¨è‰¯ã„ã§ã—ょã†ã€‚</p> + <ul> + <li>評価ã¯å·¦ã‹ã‚‰å³ã«å‘ã‹ã£ã¦è¡Œã‚れã¾ã™ã€‚</li> + <li>二値真å½å€¤ã‚ªãƒšãƒ¬ãƒ¼ã‚¿ (<code>&&</code> 㨠<code>||</code>) + ã¯ã€å‡ºæ¥ã‚‹é™ã‚ŠçŸçµ¡è©•価ã•れã¾ã™ã€‚ã¤ã¾ã‚Šçµæžœã¨ã—ã¦ä¸Šè¨˜ã®ãƒ«ãƒ¼ãƒ«ã¯ã€ + <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> ãŒå·¦ã®è©•価å¼ã‚’評価ã—ã¾ã™ã€‚ + å·¦å´ã§çµæžœã‚’å分決定ã§ãã‚‹å ´åˆã¯ã€è©•価ã¯ãã“ã§åœæ¢ã—ã¾ã™ã€‚ + ãã†ã§ãªã„å ´åˆã¯å³å´ã‚’評価ã—ã¦ã€å·¦ã¨å³ã®ä¸¡æ–¹ã‹ã‚‰çµæžœã‚’計算ã—ã¾ã™ã€‚</li> + <li>çŸçµ¡è©•価ã¯è©•価ã®å¯¾è±¡ã«æ£è¦è¡¨ç¾ãŒå«ã¾ã‚Œã‚‹å ´åˆã€ã‚ªãƒ•ã«ãªã‚Šã¾ã™ã€‚ + 後方å‚ç…§ã™ã‚‹å¤‰æ•° (<code>$1</code> .. <code>$9</code>) + を埋ã‚ã‚‹ãŸã‚ã«ã€å®Ÿéš›ã«è©•価ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã‹ã‚‰ã§ã™ã€‚</li> + </ul> + <p>特定ã®å¼ãŒã©ã®ã‚ˆã†ã«æ‰±ã‚れるã‹ã‚’知りãŸã„å ´åˆã¯ã€ + <code>-DDEBUG_INCLUDE</code> コンパイラオプションを付ã‘㦠+ <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> をリコンパイルã™ã‚‹ã¨è‰¯ã„ã§ã—ょã†ã€‚ + ã“れã«ã‚ˆã‚Šã€å…¨ã¦ã®ãƒ‘ースã•れãŸå¼ã«å¯¾ã—ã¦ã€å—å¥è§£æžæƒ…å ±ã€ + パースツリーã¨ã€ + ãれãŒã©ã®ã‚ˆã†ã«ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«é€ã‚‰ã‚ŒãŸå‡ºåŠ›ã¾ã§è©•価ã•れãŸã‹ã‚’ + 挿入ã—ã¾ã™ã€‚</p> + </div> + + <div class="note"><h3>æ£è¦è¡¨ç¾å†…ã§ã® / ã®ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—</h3> + <p>æ£è¦è¡¨ç¾å†…ã§ãƒ‡ãƒªãƒŸã‚¿ã¨ã—ã¦æ‰±ã„ãŸããªã„ / ãŒã‚れã°ã€ãれらã¯å…¨ã¦ + エスケープã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + æ£è¦è¡¨ç¾ã®æ„味ãŒã©ã†ã§ã‚ã‚ã†ã¨ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã¯å¿…è¦ã§ã™ã€‚</p> + </div> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="SSIEndTag" id="SSIEndTag">SSIEndTag</a> <a name="ssiendtag" id="ssiendtag">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>include è¦ç´ を終了ã•ã›ã‚‹æ–‡å—列</td></tr> +<tr><th><a href="directive-dict.html#Syntax">æ§‹æ–‡:</a></th><td><code>SSIEndTag <var>tag</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>SSIEndTag "-->"</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテã‚スト:</a></th><td>サーãƒè¨å®šãƒ•ァイル, ãƒãƒ¼ãƒãƒ£ãƒ«ãƒ›ã‚¹ãƒˆ</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Base</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>mod_include</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">äº’æ›æ€§:</a></th><td>2.0.30 以é™ã§åˆ©ç”¨å¯èƒ½</td></tr> +</table> + <p>ã“ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒ†ã‚£ãƒ–㯠<code class="module"><a href="../mod/mod_include.html">mod_include</a></code> ãŒæŽ¢ã™ã€ + include è¦ç´ ã®çµ‚äº†ã‚’ç¤ºã™æ–‡å—列を変更ã—ã¾ã™ã€‚</p> + + <div class="example"><h3>例</h3><p><code> + SSIEndTag "%>" + </code></p></div> + + +<h3>å‚ç…§</h3> +<ul> +<li><code class="directive"><a href="#ssistarttag">SSIStartTag</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="SSIErrorMsg" id="SSIErrorMsg">SSIErrorMsg</a> <a name="ssierrormsg" id="ssierrormsg">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>SSI ã®ã‚¨ãƒ©ãƒ¼ãŒã‚ã£ãŸã¨ãã«è¡¨ç¤ºã•れるエラーメッセージ</td></tr> +<tr><th><a href="directive-dict.html#Syntax">æ§‹æ–‡:</a></th><td><code>SSIErrorMsg <var>message</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>SSIErrorMsg "[an error occurred while processing this +directive]"</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテã‚スト:</a></th><td>サーãƒè¨å®šãƒ•ァイル, ãƒãƒ¼ãƒãƒ£ãƒ«ãƒ›ã‚¹ãƒˆ, ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">上書ã:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Base</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>mod_include</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">äº’æ›æ€§:</a></th><td>ãƒãƒ¼ã‚¸ãƒ§ãƒ³ 2.0.30 以é™ã§ä½¿ç”¨å¯èƒ½</td></tr> +</table> + <p><code class="directive">SSIErrorMsg</code> ディレクティブ㯠<code class="module"><a href="../mod/mod_include.html">mod_include</a></code> + ãŒã‚¨ãƒ©ãƒ¼ãŒèµ·ã“ã£ãŸã¨ãã«è¡¨ç¤ºã™ã‚‹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’変更ã—ã¾ã™ã€‚プãƒãƒ€ã‚¯ã‚·ãƒ§ãƒ³ã‚µãƒ¼ãƒã§ã¯ + メッセージãŒãƒ¦ãƒ¼ã‚¶ã«è¡¨ç¤ºã•れãªã„よã†ã«ã™ã‚‹ãŸã‚ã« + デフォルトエラーメッセージを <code>"<!-- Error -->"</code> + ã«å¤‰ãˆã‚‹ã¨ã„ã†ã‚ˆã†ãªã“ã¨ã‚’考ãˆã‚‹ã‹ã‚‚ã—れã¾ã›ã‚“。</p> + + <p>ã“ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒ†ã‚£ãƒ–㯠<code><!--#config + errmsg=<var>message</var> --></code> è¦ç´ ã¨åŒã˜åŠ¹æžœã«ãªã‚Šã¾ã™ã€‚</p> + + <div class="example"><h3>例</h3><p><code> + SSIErrorMsg "<!-- Error -->" + </code></p></div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="SSIETag" id="SSIETag">SSIETag</a> <a name="ssietag" id="ssietag">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Controls whether ETags are generated by the server.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">æ§‹æ–‡:</a></th><td><code>SSIETag on|off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>SSIETag off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテã‚スト:</a></th><td>ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Base</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>mod_include</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">äº’æ›æ€§:</a></th><td>Available in version 2.2.15 and later.</td></tr> +</table><p>ã“ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒ†ã‚£ãƒ–ã®è§£èª¬æ–‡æ›¸ã¯ + ã¾ã 翻訳ã•れã¦ã„ã¾ã›ã‚“。英語版をã”覧ãã ã•ã„。 + </p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="SSILastModified" id="SSILastModified">SSILastModified</a> <a name="ssilastmodified" id="ssilastmodified">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Controls whether <code>Last-Modified</code> headers are generated by the +server.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">æ§‹æ–‡:</a></th><td><code>SSILastModified on|off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>SSILastModified off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテã‚スト:</a></th><td>ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Base</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>mod_include</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">äº’æ›æ€§:</a></th><td>Available in version 2.2.15 and later.</td></tr> +</table><p>ã“ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒ†ã‚£ãƒ–ã®è§£èª¬æ–‡æ›¸ã¯ + ã¾ã 翻訳ã•れã¦ã„ã¾ã›ã‚“。英語版をã”覧ãã ã•ã„。 + </p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="SSILegacyExprParser" id="SSILegacyExprParser">SSILegacyExprParser</a> <a name="ssilegacyexprparser" id="ssilegacyexprparser">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Enable compatibility mode for conditional expressions.</td></tr> +<tr><th><a href="directive-dict.html#Syntax">æ§‹æ–‡:</a></th><td><code>SSILegacyExprParser on|off</code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>SSILegacyExprParser off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテã‚スト:</a></th><td>ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Base</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>mod_include</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">äº’æ›æ€§:</a></th><td>Available in version 2.3.13 and later.</td></tr> +</table><p>ã“ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒ†ã‚£ãƒ–ã®è§£èª¬æ–‡æ›¸ã¯ + ã¾ã 翻訳ã•れã¦ã„ã¾ã›ã‚“。英語版をã”覧ãã ã•ã„。 + </p></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="SSIStartTag" id="SSIStartTag">SSIStartTag</a> <a name="ssistarttag" id="ssistarttag">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>include è¦ç´ ã‚’é–‹å§‹ã™ã‚‹æ–‡å—列</td></tr> +<tr><th><a href="directive-dict.html#Syntax">æ§‹æ–‡:</a></th><td><code>SSIStartTag <var>tag</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>SSIStartTag "<!--#"</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテã‚スト:</a></th><td>サーãƒè¨å®šãƒ•ァイル, ãƒãƒ¼ãƒãƒ£ãƒ«ãƒ›ã‚¹ãƒˆ</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Base</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>mod_include</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">äº’æ›æ€§:</a></th><td>ãƒãƒ¼ã‚¸ãƒ§ãƒ³ 2.0.30 以é™ã§ä½¿ç”¨å¯èƒ½</td></tr> +</table> + + <p>ã“ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒ†ã‚£ãƒ–㯠<code class="module"><a href="../mod/mod_include.html">mod_include</a></code> ãŒæŽ¢ã™ã€include + è¦ç´ ã®é–‹å§‹ã‚’ç¤ºã™æ–‡å—列を変更ã—ã¾ã™ã€‚</p> + + <p>二ã¤ã®ã‚µãƒ¼ãƒã§ (ã‚‚ã—ã‹ã™ã‚‹ã¨åˆ¥ã€…ã®æ®µéšŽã§) ファイルã®å‡ºåŠ›ã‚’è§£æžã—ã¦ã„ã¦ã€ + ãれãžã‚Œã«é•ã†ã‚³ãƒžãƒ³ãƒ‰ã‚’処ç†ã•ã›ãŸã„〠+ ã¨ã„ã†ã‚ˆã†ãªã¨ãã«ã“ã®ã‚ªãƒ—ションを使ã„ã¾ã™ã€‚</p> + + <div class="example"><h3>例</h3><p><code> + SSIStartTag "<%"<br /> + SSIEndTag "%>" + </code></p></div> + + <p>上ã®ä¾‹ã®ã‚ˆã†ã«å¯¾å¿œã™ã‚‹ + <code class="directive"><a href="#ssiendtag">SSIEndTag</a></code> ã‚’ä½µã›ã¦ä½¿ã†ã¨ã€ + 下ã«ç¤ºã™ä¾‹ã®ã‚ˆã†ã« SSI ディレクティブを使ãˆã¾ã™:</p> + + <div class="example"><h3>é•ã†é–‹å§‹ã¨çµ‚了ã®ã‚¿ã‚°ã‚’使ã£ãŸ SSI ディレクティブ</h3><p><code> + <%printenv %> + </code></p></div> + +<h3>å‚ç…§</h3> +<ul> +<li><code class="directive"><a href="#ssiendtag">SSIEndTag</a></code></li> +</ul> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="SSITimeFormat" id="SSITimeFormat">SSITimeFormat</a> <a name="ssitimeformat" id="ssitimeformat">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>日付ã‘ã‚’ç¾ã™æ–‡å—åˆ—ã®æ›¸å¼ã‚’è¨å®šã™ã‚‹</td></tr> +<tr><th><a href="directive-dict.html#Syntax">æ§‹æ–‡:</a></th><td><code>SSITimeFormat <var>formatstring</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>SSITimeFormat "%A, %d-%b-%Y %H:%M:%S %Z"</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテã‚スト:</a></th><td>サーãƒè¨å®šãƒ•ァイル, ãƒãƒ¼ãƒãƒ£ãƒ«ãƒ›ã‚¹ãƒˆ, ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">上書ã:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Base</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>mod_include</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">äº’æ›æ€§:</a></th><td>2.0.30 以é™ã§ä½¿ç”¨å¯èƒ½</td></tr> +</table> +<p>ã“ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒ†ã‚£ãƒ–㯠<code>DATE</code> 環境変数を echo ã—ã¦æ—¥ä»˜ã‚’ç¾ã™æ–‡å—列㌠+ 表示ã•れるã¨ãã®æ›¸å¼ã‚’変更ã—ã¾ã™ã€‚<var>formatstring</var> 㯠+ C 標準ライブラリ㮠<code>strftime(3)</code> ã¨åŒã˜å½¢å¼ã§ã™ã€‚</p> + + <p>ã“ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒ†ã‚£ãƒ–㯠<code><!--#config + timefmt=<var>formatstring</var> --></code> è¦ç´ ã¨åŒã˜åŠ¹æžœã«ãªã‚Šã¾ã™ã€‚</p> + + <div class="example"><h3>例</h3><p><code> + SSITimeFormat "%R, %B %d, %Y" + </code></p></div> + + <p>上ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒ†ã‚£ãƒ–ã§ã¯ã€æ—¥ä»˜ã¯ "22:26, June 14, 2002" ã¨ã„ㆠ+ å½¢å¼ã§è¡¨ç¤ºã•れã¾ã™ã€‚</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="SSIUndefinedEcho" id="SSIUndefinedEcho">SSIUndefinedEcho</a> <a name="ssiundefinedecho" id="ssiundefinedecho">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>未定義ã®å¤‰æ•°ãŒ echo ã•れãŸã¨ãã«è¡¨ç¤ºã•れる文å—列</td></tr> +<tr><th><a href="directive-dict.html#Syntax">æ§‹æ–‡:</a></th><td><code>SSIUndefinedEcho <var>string</var></code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>SSIUndefinedEcho "(none)"</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテã‚スト:</a></th><td>サーãƒè¨å®šãƒ•ァイル, ãƒãƒ¼ãƒãƒ£ãƒ«ãƒ›ã‚¹ãƒˆ, ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">上書ã:</a></th><td>All</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Base</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>mod_include</td></tr> +<tr><th><a href="directive-dict.html#Compatibility">äº’æ›æ€§:</a></th><td>2.0.34 以é™ã§åˆ©ç”¨å¯èƒ½</td></tr> +</table> + <p>ã“ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒ†ã‚£ãƒ–ã¯å¤‰æ•°ãŒå®šç¾©ã•れã¦ã„ãªã„ã«ã‚‚é–¢ã‚ら㚠+ "echo" ã•れãŸã¨ãã« <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> + ãŒè¡¨ç¤ºã™ã‚‹æ–‡å—列を変更ã—ã¾ã™ã€‚</p> + + <div class="example"><h3>例</h3><p><code> + SSIUndefinedEcho "<!-- undef -->" + </code></p></div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="XBitHack" id="XBitHack">XBitHack</a> <a name="xbithack" id="xbithack">ディレクティブ</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>実行ビットãŒè¨å®šã•れãŸãƒ•ァイル㮠SSI ディレクティブを +è§£æžã™ã‚‹</td></tr> +<tr><th><a href="directive-dict.html#Syntax">æ§‹æ–‡:</a></th><td><code>XBitHack on|off|full</code></td></tr> +<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>XBitHack off</code></td></tr> +<tr><th><a href="directive-dict.html#Context">コンテã‚スト:</a></th><td>サーãƒè¨å®šãƒ•ァイル, ãƒãƒ¼ãƒãƒ£ãƒ«ãƒ›ã‚¹ãƒˆ, ディレクトリ, .htaccess</td></tr> +<tr><th><a href="directive-dict.html#Override">上書ã:</a></th><td>Options</td></tr> +<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Base</td></tr> +<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>mod_include</td></tr> +</table> + <p><code class="directive">XBitHack</code> ディレクティブã¯é€šå¸¸ã® HTML + ドã‚ュメントã®è§£æžã‚’制御ã—ã¾ã™ã€‚ã“ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒ†ã‚£ãƒ–㯠<a class="glossarylink" href="../glossary.html#mime-type" title="用語集をå‚ç…§">MIME タイプ</a> + <code>text/html</code> ã¨é–¢é€£ä»˜ã‘られã¦ã„るファイルã«ã®ã¿å½±éŸ¿ã—ã¾ã™ã€‚ + <code class="directive">XBitHack</code> ã¯ä»¥ä¸‹ã®å€¤ã‚’ã¨ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚</p> + + <dl> + <dt><code>off</code></dt> + <dd>実行å¯èƒ½ãƒ•ァイルã«å¯¾ã—ã¦ç‰¹åˆ¥ãªæ‰±ã„ã‚’ã—ã¾ã›ã‚“。</dd> + + <dt><code>on</code></dt> + <dd>ユーザã®å®Ÿè¡Œãƒ“ットãŒè¨å®šã•れã¦ã„ã‚‹ <code>text/html</code> + ファイルã¯å…¨ã¦ã‚µãƒ¼ãƒã§è§£æžã™ã‚‹ html ドã‚ュメントã¨ã—ã¦æ‰±ã‚れã¾ã™ã€‚</dd> + + <dt><code>full</code></dt> + <dd><code>on</code> ã¨åŒæ§˜ã§ã™ãŒã€ã‚°ãƒ«ãƒ¼ãƒ—実行ビットもテストã—ã¾ã™ã€‚ + ã‚‚ã—ãれãŒè¨å®šã•れã¦ã„れã°ã€è¿”ã•れるファイル㮠<code>Last-modified</code> ã® + æ—¥ä»˜ã‚’ãƒ•ã‚¡ã‚¤ãƒ«ã®æœ€çµ‚ä¿®æ£æ™‚刻ã«ã—ã¾ã™ã€‚ãれãŒè¨å®šã•れã¦ã„ãªã„ã¨ãã¯ã€ + last-modified ã®æ—¥ä»˜ã¯é€ã‚‰ã‚Œã¾ã›ã‚“。ã“ã®ãƒ“ットをè¨å®šã™ã‚‹ã¨ã€ + クライアントやプãƒã‚ã‚·ãŒãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’ã‚ャッシュã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ + + <div class="note"><strong>注æ„</strong> ä»–ã® CGI ã‚’ <code>#include</code> + ã™ã‚‹ã‹ã‚‚ã—れãªã„ã‚‚ã®ã‚„ã€å„アクセスã«å¯¾ã—ã¦é•ã†å‡ºåŠ›ã‚’ç”Ÿæˆã™ã‚‹ + (ã‚‚ã—ãã¯å¾Œã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã§å¤‰ã‚ã‚‹ã‹ã‚‚ã—れãªã„ã‚‚ã®) + ã™ã¹ã¦ã® SSI スクリプトã«å¯¾ã—ã¦ã‚°ãƒ«ãƒ¼ãƒ—実行ビット㌠+ è¨å®šã•れã¦ã„ãªã„ã“ã¨ã‚’確èªã§ããªã„å ´åˆã¯ã€full ã¯ä½¿ã‚ãªã„æ–¹ãŒè‰¯ã„ + ã§ã—ょã†ã€‚</div> + </dd> + </dl> + + +</div> +</div> +<div class="bottomlang"> +<p><span>翻訳済ã¿è¨€èªž: </span><a href="../en/mod/mod_include.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="../fr/mod/mod_include.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="../ja/mod/mod_include.html" title="Japanese"> ja </a></p> +</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">コメント</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&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> +<script type="text/javascript"><!--//--><![CDATA[//><!-- +var comments_shortname = 'httpd'; +var comments_identifier = 'http://httpd.apache.org/docs/2.4/mod/mod_include.html'; +(function(w, d) { + if (w.location.hostname.toLowerCase() == "httpd.apache.org") { + d.write('<div id="comments_thread"><\/div>'); + var s = d.createElement('script'); + s.type = 'text/javascript'; + s.async = true; + s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier; + (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s); + } + else { + d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>'); + } +})(window, document); +//--><!]]></script></div><div id="footer"> +<p class="apache">Copyright 2019 The Apache Software Foundation.<br />ã“ã®æ–‡æ›¸ã¯ <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> ã®ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ã§æä¾›ã•れã¦ã„ã¾ã™ã€‚.</p> +<p class="menu"><a href="../mod/">モジュール</a> | <a href="../mod/directives.html">ディレクティブ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">用語</a> | <a href="../sitemap.html">サイトマップ</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!-- +if (typeof(prettyPrint) !== 'undefined') { + prettyPrint(); +} +//--><!]]></script> +</body></html>
\ No newline at end of file |