From: Daniel Gruno Date: Fri, 30 Mar 2012 08:49:24 +0000 (+0000) Subject: Rebuild X-Git-Tag: 2.4.2~68 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=895212d754783512e9e5a476546fbe4424b3ed00;p=apache Rebuild git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1307312 13f79535-47bb-0310-9956-ffa450edef68 --- 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 @@
  • Binary operators
  • Unary operators
  • Functions
  • +
  • Example expressions
  • Other
  • Comparison with SSLRequire
  • See also

    @@ -440,6 +441,33 @@ listfunction ::= listfuncname "(" word ")"
    top
    +

    Example expressions

    + + +

    The following examples show how expressions might be used to evaluate requests:

    + +

    + # Compare the host name to example.com and redirect to www.example.com if it matches
    + <If "%{HTTP_HOST} == 'example.com'">
    + + Redirect permanent / http://www.example.com
    +
    + </If>

    + # Force text/plain if requesting a file with the query string contains 'forcetext'
    + <If "%{QUERY_STRING} =~ /forcetext/">
    + + ForceType text/plain
    +
    + </If>

    + # Only allow access to this content during business hours
    + <Directory "/foo/bar/business">
    + + Require expr %{TIME_HOUR} >= 9 && %{TIME_HOUR} <= 17
    +
    + </Directory> +

    +
    top
    +

    Other