summaryrefslogtreecommitdiff
path: root/docs/manual/expr.html.en
diff options
context:
space:
mode:
authorDaniel Gruno <humbedooh@apache.org>2012-03-30 08:49:24 +0000
committerDaniel Gruno <humbedooh@apache.org>2012-03-30 08:49:24 +0000
commit895212d754783512e9e5a476546fbe4424b3ed00 (patch)
tree7a8a279b2a2eee515fdb922e1776085fe76066c9 /docs/manual/expr.html.en
parent373b57d0a68efdf734f0c3cc1bd57e25177ee91f (diff)
downloadhttpd-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.en28
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">&lt;If&gt;</a></code></li><li><code class="directive"><a href="./mod/core.html#elseif">&lt;ElseIf&gt;</a></code></li><li><code class="directive"><a href="./mod/core.html#else">&lt;Else&gt;</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 />
+ &lt;If "%{HTTP_HOST} == 'example.com'"&gt;<br />
+ <span class="indent">
+ Redirect permanent / http://www.example.com<br />
+ </span>
+ &lt;/If&gt;<br /><br />
+ # Force text/plain if requesting a file with the query string contains 'forcetext'<br />
+ &lt;If "%{QUERY_STRING} =~ /forcetext/"&gt;<br />
+ <span class="indent">
+ ForceType text/plain<br />
+ </span>
+ &lt;/If&gt;<br /><br />
+ # Only allow access to this content during business hours<br />
+ &lt;Directory "/foo/bar/business"&gt;<br />
+ <span class="indent">
+ Require expr %{TIME_HOUR} &gt;= 9 &amp;&amp; %{TIME_HOUR} &lt;= 17 <br />
+ </span>
+ &lt;/Directory&gt;
+ </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>