diff options
author | Stefan Fritsch <sf@apache.org> | 2011-06-07 00:17:44 +0200 |
---|---|---|
committer | Stefan Fritsch <sf@apache.org> | 2011-06-07 00:17:44 +0200 |
commit | 9e03d7e1afc50863089be42ba92a40b316126e99 (patch) | |
tree | de6f5f4d60a07779b1ae69f6a22254cddc6352de /docs/manual/mod/core.html.en | |
parent | purge some useless uses of '.*' (diff) | |
download | apache2-9e03d7e1afc50863089be42ba92a40b316126e99.tar.xz apache2-9e03d7e1afc50863089be42ba92a40b316126e99.zip |
Update transforms
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1132803 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/manual/mod/core.html.en')
-rw-r--r-- | docs/manual/mod/core.html.en | 133 |
1 files changed, 120 insertions, 13 deletions
diff --git a/docs/manual/mod/core.html.en b/docs/manual/mod/core.html.en index 7cda3975a6..40053607b9 100644 --- a/docs/manual/mod/core.html.en +++ b/docs/manual/mod/core.html.en @@ -47,6 +47,8 @@ available</td></tr> <li><img alt="" src="../images/down.gif" /> <a href="#directory"><Directory></a></li> <li><img alt="" src="../images/down.gif" /> <a href="#directorymatch"><DirectoryMatch></a></li> <li><img alt="" src="../images/down.gif" /> <a href="#documentroot">DocumentRoot</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#else"><Else></a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#elseif"><ElseIf></a></li> <li><img alt="" src="../images/down.gif" /> <a href="#enablemmap">EnableMMAP</a></li> <li><img alt="" src="../images/down.gif" /> <a href="#enablesendfile">EnableSendfile</a></li> <li><img alt="" src="../images/down.gif" /> <a href="#error">Error</a></li> @@ -857,6 +859,104 @@ Locations</a></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="Else" id="Else"><Else></a> <a name="else" id="else">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply only if the condition of a +previous <code class="directive"><a href="#if"><If></a></code> or +<code class="directive"><a href="#elseif"><ElseIf></a></code> section is not +satisfied by a request at runtime</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><Else> ... </Else></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>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>The <code class="directive"><Else></code> applies the enclosed + directives if and only if the most recent + <code class="directive"><If></code> or + <code class="directive"><ElseIf></code> section + in the same scope has not been applied. + For example: In </p> + + <div class="example"><p><code> + <If "-z req('Host')"><br /> + ...<br /> + </If><br /> + <Else><br /> + ...<br /> + </Else><br /> + </code></p></div> + + <p> The <code class="directive"><If></code> would match HTTP/1.0 + requests without a <var>Host:</var> header and the + <code class="directive"><Else></code> would match requests + with a <var>Host:</var> header.</p> + + +<h3>See also</h3> +<ul> +<li><code class="directive"><a href="#if"><If></a></code></li> +<li><code class="directive"><a href="#elseif"><ElseIf></a></code></li> +<li><a href="../sections.html">How <Directory>, <Location>, + <Files> sections work</a> for an explanation of how these + different sections are combined when a request is received. + <code class="directive"><If></code>, + <code class="directive"><ElseIf></code>, and + <code class="directive"><Else></code> are applied last.</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="ElseIf" id="ElseIf"><ElseIf></a> <a name="elseif" id="elseif">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply only if a condition is satisfied +by a request at runtime while the condition of a previous +<code class="directive"><a href="#if"><If></a></code> or +<code class="directive"><ElseIf></code> section is not +satisfied</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><ElseIf <var>expression</var>> ... </ElseIf></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>Core</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> +</table> + <p>The <code class="directive"><ElseIf></code> applies the enclosed + directives if and only if both the given condition evaluates to true and + the most recent <code class="directive"><If></code> or + <code class="directive"><ElseIf></code> section in the same scope has + not been applied. For example: In </p> + + <div class="example"><p><code> + <If "-R '10.1.0.0/16'"><br /> + ...<br /> + </If><br /> + <ElseIf "-R '10.0.0.0/8'"><br /> + ...<br /> + </ElseIf><br /> + <Else><br /> + ...<br /> + </Else><br /> + </code></p></div> + + <p>The <code class="directive"><ElseIf></code> would match if + the remote address of a request belongs to the subnet 10.0.0.0/8 but + not to the subnet 10.1.0.0/16.</p> + + +<h3>See also</h3> +<ul> +<li><a href="../expr.html">Expressions in Apache HTTP Server</a>, +for a complete reference and more examples.</li> +<li><code class="directive"><a href="#if"><If></a></code></li> +<li><code class="directive"><a href="#else"><Else></a></code></li> +<li><a href="../sections.html">How <Directory>, <Location>, + <Files> sections work</a> for an explanation of how these + different sections are combined when a request is received. + <code class="directive"><If></code>, + <code class="directive"><ElseIf></code>, and + <code class="directive"><Else></code> are applied last.</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="EnableMMAP" id="EnableMMAP">EnableMMAP</a> <a name="enablemmap" id="enablemmap">Directive</a></h2> <table class="directive"> <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Use memory-mapping to read files during delivery</td></tr> @@ -1627,32 +1727,39 @@ satisfied by a request at runtime</td></tr> For example:</p> <div class="example"><p><code> - <If "$req{Host} = ''"> + <If "-z req('Host')"> </code></p></div> - <p>would match HTTP/1.0 requests without a <var>Host:</var> header.</p> - - <p>You may compare the value of any variable in the request headers - ($req), response headers ($resp) or environment ($env) in your - expression.</p> - - <p>Apart from <code>=</code>, <code>If</code> can use the <code>IN</code> - operator to compare if the expression is in a given range:</p> + <p>would match HTTP/1.0 requests without a <var>Host:</var> header. + Expressions may contain various shell-like operators for string + comparison (<code>=</code>, <code>!=</code>, <code><</code>, ...), + integer comparison (<code>-eq</code>, <code>-ne</code>, ...), + and others (<code>-n</code>, <code>-z</code>, <code>-f</code>, ...). + It is also possible to use regular expressions, </p> <div class="example"><p><code> - <If %{REQUEST_METHOD} IN GET,HEAD,OPTIONS> + <If "%{QUERY_STRING =~ /(delete|commit)=.*?elem/"> </code></p></div> + <p>shell-like pattern matches and many other operations. These operations + can be done on request headers (<code>req</code>), environment variables + (<code>env</code>), and a large number of other properties. The full + documentation is available in <a href="../expr.html">Expressions in + Apache HTTP Server</a>.</p> + <h3>See also</h3> <ul> <li><a href="../expr.html">Expressions in Apache HTTP Server</a>, for a complete reference and more examples.</li> +<li><code class="directive"><a href="#elseif"><ElseIf></a></code></li> +<li><code class="directive"><a href="#else"><Else></a></code></li> <li><a href="../sections.html">How <Directory>, <Location>, <Files> sections work</a> for an explanation of how these different sections are combined when a request is received. - <code class="directive"><If></code> has the same precedence - and usage as <code class="directive"><Files></code></li> + <code class="directive"><If></code>, + <code class="directive"><ElseIf></code>, and + <code class="directive"><Else></code> are applied last.</li> </ul> </div> <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> @@ -3809,7 +3916,7 @@ certain events before failing a request</td></tr> <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determines the behaviour on <code>TRACE</code> requests</td></tr> <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>TraceEnable <var>[on|off|extended]</var></code></td></tr> <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>TraceEnable on</code></td></tr> -<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</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>Core</td></tr> <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr> <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 1.3.34, 2.0.55 and later</td></tr> |