You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by hu...@apache.org on 2012/03/30 10:46:39 UTC
svn commit: r1307309 - /httpd/httpd/trunk/docs/manual/expr.html.en
Author: humbedooh
Date: Fri Mar 30 08:46:38 2012
New Revision: 1307309
URL: http://svn.apache.org/viewvc?rev=1307309&view=rev
Log:
Rebuild
Modified:
httpd/httpd/trunk/docs/manual/expr.html.en
Modified: httpd/httpd/trunk/docs/manual/expr.html.en
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/expr.html.en?rev=1307309&r1=1307308&r2=1307309&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/expr.html.en (original)
+++ httpd/httpd/trunk/docs/manual/expr.html.en Fri Mar 30 08:46:38 2012
@@ -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="direct
ive"><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>(
</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>