]> granicus.if.org Git - apache/commitdiff
add a few more expresion examples to illustrate functions and -f
authorEric Covener <covener@apache.org>
Wed, 26 Nov 2014 19:05:12 +0000 (19:05 +0000)
committerEric Covener <covener@apache.org>
Wed, 26 Nov 2014 19:05:12 +0000 (19:05 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1641888 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/expr.xml

index 5bb6f5ee240408c3940bbe761a83350926913b9f..e386ff51acbf731781bb7171e38685cc3c0f3b88 100644 (file)
@@ -580,6 +580,18 @@ listfunction ::= listfuncname "<strong>(</strong>" word "<strong>)</strong>"
     Header set matched true
 &lt;/If&gt;
 
+# Check an environment variable for a regular expression, negated.
+&lt;If "! reqenv('REDIRECT_FOO') =~ /bar/"&gt;
+    Header set matched true
+&lt;/If&gt;
+
+# Check result of URI mapping by running in Directory context with -f
+&lt;Directory /var/www&gt;
+    AddEncoding x-gzip gz
+&lt;If "-f '%{REQUEST_FILENAME}.unzipme' &amp;&amp; ! %{HTTP:Accept-Encoding} =~ /gzip/"&gt;
+      SetOutputFilter INFLATE
+&lt;/If&gt;
+&lt;/Directory&gt;
 
        </highlight>
 </section>