]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Take into account an old comment from Thomas.
authorChristophe Jaillet <jailletc36@apache.org>
Fri, 29 Jan 2016 21:49:37 +0000 (21:49 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Fri, 29 Jan 2016 21:49:37 +0000 (21:49 +0000)
Add an example using regex

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1727644 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/mod_setenvif.xml

index 2276091a2a468fb46f1678c98774a856c1246c47..0c75149d1c7b878c24b4cc9780a35c5af2a38d67 100644 (file)
@@ -220,7 +220,8 @@ of</p>
     <code><em>value</em></code>. Since version 2.0.51, Apache httpd will
     recognize occurrences of <code>$1</code>..<code>$9</code> within
     <var>value</var> and replace them by parenthesized subexpressions
-    of <var>regex</var>.</p>
+    of <var>regex</var>. <code>$0</code> provides access to the whole
+    string matched by that pattern.</p>
 
 <highlight language="config">
 SetEnvIf Request_URI "\.gif$" object_is_image=gif
@@ -231,6 +232,8 @@ SetEnvIf Referer www\.mydomain\.example\.com intra_site_referral
     
 SetEnvIf object_is_image xbm XBIT_PROCESSING=1
     
+SetEnvIf Request_URI "\.(.*)$" EXTENSION=$1
+
 SetEnvIf ^TS  ^[a-z]  HAVE_TS
 </highlight>