diff options
author | Daniel Gruno <humbedooh@apache.org> | 2012-03-30 08:49:24 +0000 |
---|---|---|
committer | Daniel Gruno <humbedooh@apache.org> | 2012-03-30 08:49:24 +0000 |
commit | 895212d754783512e9e5a476546fbe4424b3ed00 (patch) | |
tree | 7a8a279b2a2eee515fdb922e1776085fe76066c9 /docs/manual/expr.html.en | |
parent | 373b57d0a68efdf734f0c3cc1bd57e25177ee91f (diff) | |
download | httpd-895212d754783512e9e5a476546fbe4424b3ed00.tar.gz |
Rebuild
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1307312 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/manual/expr.html.en')
-rw-r--r-- | docs/manual/expr.html.en | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/docs/manual/expr.html.en b/docs/manual/expr.html.en index 3ef5334238..20176d7f77 100644 --- a/docs/manual/expr.html.en +++ b/docs/manual/expr.html.en @@ -39,6 +39,7 @@ <li><img alt="" src="./images/down.gif" /> <a href="#binop">Binary operators</a></li> <li><img alt="" src="./images/down.gif" /> <a href="#unnop">Unary operators</a></li> <li><img alt="" src="./images/down.gif" /> <a href="#functions">Functions</a></li> +<li><img alt="" src="./images/down.gif" /> <a href="#examples">Example expressions</a></li> <li><img alt="" src="./images/down.gif" /> <a href="#other">Other</a></li> <li><img alt="" src="./images/down.gif" /> <a href="#sslrequire">Comparison with SSLRequire</a></li> </ul><h3>See also</h3><ul class="seealso"><li><code class="directive"><a href="./mod/core.html#if"><If></a></code></li><li><code class="directive"><a href="./mod/core.html#elseif"><ElseIf></a></code></li><li><code class="directive"><a href="./mod/core.html#else"><Else></a></code></li><li><code class="directive"><a href="./mod/mod_rewrite.html#rewritecond">RewriteCond</a></code></li><li><code class="directive"><a href="./mod/mod_setenvif.html#setenvifexpr">SetEnvIfExpr</a></code></li><li><code class="directive"><a href="./mod/mod_headers.html#header">Header</a></code></li><li><code class="directive"><a href="./mod/mod_headers.html#requestheader">RequestHeader</a></code></li><li><code class="directive"><a href="./mod/mod_filter.html#filterprovider">FilterProvider</a></code></li><li><a href="mod/mod_authz_core.html#reqexpr">Require expr</a></li><li><code class="directive"><a href="./mod/mod_ssl.html#sslrequire">SSLRequire</a></code></li><li><code class="directive"><a href="./mod/mod_log_debug.html#logmessage">LogMessage</a></code></li><li><code class="module"><a href="./mod/mod_include.html">mod_include</a></code></li></ul></div> @@ -440,6 +441,33 @@ listfunction ::= listfuncname "<strong>(</strong>" word "<strong>)</strong>" </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> <div class="section"> +<h2><a name="examples" id="examples">Example expressions</a></h2> + + + <p>The following examples show how expressions might be used to evaluate requests:</p> + + <div class="example"><p><code> + # Compare the host name to example.com and redirect to www.example.com if it matches<br /> + <If "%{HTTP_HOST} == 'example.com'"><br /> + <span class="indent"> + Redirect permanent / http://www.example.com<br /> + </span> + </If><br /><br /> + # Force text/plain if requesting a file with the query string contains 'forcetext'<br /> + <If "%{QUERY_STRING} =~ /forcetext/"><br /> + <span class="indent"> + ForceType text/plain<br /> + </span> + </If><br /><br /> + # Only allow access to this content during business hours<br /> + <Directory "/foo/bar/business"><br /> + <span class="indent"> + Require expr %{TIME_HOUR} >= 9 && %{TIME_HOUR} <= 17 <br /> + </span> + </Directory> + </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="other" id="other">Other</a></h2> |