From: Rich Bowen Date: Fri, 8 Apr 2011 14:46:45 +0000 (+0000) Subject: hernan gonzalez points out that the USER_AGENT X-Git-Tag: 2.2.18~52 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2443017d40b2d4c71ffc30f2e56ff0c239313a9f;p=thirdparty%2Fapache%2Fhttpd.git hernan gonzalez points out that the USER_AGENT strings were probably more accurate with the leading ^ anchor. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@1090283 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/mod_rewrite.html.en b/docs/manual/mod/mod_rewrite.html.en index badce441962..d72297c9685 100644 --- a/docs/manual/mod/mod_rewrite.html.en +++ b/docs/manual/mod/mod_rewrite.html.en @@ -650,10 +650,10 @@ RewriteRule ...some special stuff for any of these hosts... use the following:

-RewriteCond  %{HTTP_USER_AGENT}  Mozilla
+RewriteCond  %{HTTP_USER_AGENT}  ^Mozilla
 RewriteRule  ^/$                 /homepage.max.html  [L]
 
-RewriteCond  %{HTTP_USER_AGENT}  Lynx
+RewriteCond  %{HTTP_USER_AGENT}  ^Lynx
 RewriteRule  ^/$                 /homepage.min.html  [L]
 
 RewriteRule  ^/$                 /homepage.std.html  [L]
diff --git a/docs/manual/mod/mod_rewrite.xml b/docs/manual/mod/mod_rewrite.xml
index e29aad930ce..a11f4fbc9ff 100644
--- a/docs/manual/mod/mod_rewrite.xml
+++ b/docs/manual/mod/mod_rewrite.xml
@@ -1082,10 +1082,10 @@ RewriteRule ...some special stuff for any of these hosts...
 
 
 
-RewriteCond  %{HTTP_USER_AGENT}  Mozilla
+RewriteCond  %{HTTP_USER_AGENT}  ^Mozilla
 RewriteRule  ^/$                 /homepage.max.html  [L]
 
-RewriteCond  %{HTTP_USER_AGENT}  Lynx
+RewriteCond  %{HTTP_USER_AGENT}  ^Lynx
 RewriteRule  ^/$                 /homepage.min.html  [L]
 
 RewriteRule  ^/$                 /homepage.std.html  [L]
diff --git a/docs/manual/rewrite/remapping.html.en b/docs/manual/rewrite/remapping.html.en
index 1bae21c312d..f71b214b330 100644
--- a/docs/manual/rewrite/remapping.html.en
+++ b/docs/manual/rewrite/remapping.html.en
@@ -461,11 +461,11 @@ com       http://www.example.com/
This is done with the following ruleset:

-RewriteCond %{HTTP_USER_AGENT} Mozilla/3.*
+RewriteCond %{HTTP_USER_AGENT} ^Mozilla/3.*
RewriteRule ^foo\.html$ foo.NS.html [L]

-RewriteCond %{HTTP_USER_AGENT} Lynx/ [OR]
-RewriteCond %{HTTP_USER_AGENT} Mozilla/[12]
+RewriteCond %{HTTP_USER_AGENT} ^Lynx/ [OR]
+RewriteCond %{HTTP_USER_AGENT} ^Mozilla/[12]
RewriteRule ^foo\.html$ foo.20.html [L]

RewriteRule ^foo\.html$ foo.32.html [L] diff --git a/docs/manual/rewrite/remapping.xml b/docs/manual/rewrite/remapping.xml index ddf289199bf..2f172587474 100644 --- a/docs/manual/rewrite/remapping.xml +++ b/docs/manual/rewrite/remapping.xml @@ -464,11 +464,11 @@ com http://www.example.com/
This is done with the following ruleset:

-RewriteCond %{HTTP_USER_AGENT} Mozilla/3.*
+RewriteCond %{HTTP_USER_AGENT} ^Mozilla/3.*
RewriteRule ^foo\.html$ foo.NS.html [L]

-RewriteCond %{HTTP_USER_AGENT} Lynx/ [OR]
-RewriteCond %{HTTP_USER_AGENT} Mozilla/[12]
+RewriteCond %{HTTP_USER_AGENT} ^Lynx/ [OR]
+RewriteCond %{HTTP_USER_AGENT} ^Mozilla/[12]
RewriteRule ^foo\.html$ foo.20.html [L]

RewriteRule ^foo\.html$ foo.32.html [L]