From: Rich Bowen Date: Fri, 7 Dec 2007 18:55:58 +0000 (+0000) Subject: Rebuild HTML from XML changes. X-Git-Tag: 2.2.7~151 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=91d67bf7479a1874823589b39f32630c8be2b695;p=thirdparty%2Fapache%2Fhttpd.git Rebuild HTML from XML changes. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@602177 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/misc/rewriteguide.html.en b/docs/manual/misc/rewriteguide.html.en index 32b8b01ff3e..44b8bcd3441 100644 --- a/docs/manual/misc/rewriteguide.html.en +++ b/docs/manual/misc/rewriteguide.html.en @@ -135,19 +135,23 @@ RewriteRule ^/([uge])/([^/]+)$ /$1/$2/ [<
Description:
-
...
+
The goal of this rule is to force the use of a particular + hostname, in preference to other hostnames which may be used to + reach the same site. For example, if you wish to force the use + of www.example.com instead of + example.com, you might use a variant of the + following recipe.
+
Solution:
-RewriteCond %{HTTP_HOST}   !^fully\.qualified\.domain\.name [NC]
-RewriteCond %{HTTP_HOST}   !^$
-RewriteCond %{SERVER_PORT} !^80$
-RewriteRule ^/(.*)         http://fully.qualified.domain.name:%{SERVER_PORT}/$1 [L,R]
-RewriteCond %{HTTP_HOST}   !^fully\.qualified\.domain\.name [NC]
+# To force the use of 
+RewriteEngine On
+RewriteCond %{HTTP_HOST}   !^www\.example\.com [NC]
 RewriteCond %{HTTP_HOST}   !^$
-RewriteRule ^/(.*)         http://fully.qualified.domain.name/$1 [L,R]
+RewriteRule ^/(.*)         http://www.example.com/$1 [L,R]