]> granicus.if.org Git - apache/commitdiff
Take into account an old comment from Thomas.
authorChristophe Jaillet <jailletc36@apache.org>
Fri, 29 Jan 2016 21:46:27 +0000 (21:46 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Fri, 29 Jan 2016 21:46:27 +0000 (21:46 +0000)
Add an example using regex

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1727642 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/mod_setenvif.xml

index 1b0d9ca7be00d2eebed372851a03e96b04b7db39..7b40fcc184e07bb3013ee059627f7350c7ef918b 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>. $0 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>