httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rbo...@apache.org
Subject svn commit: r602173 - /httpd/httpd/branches/2.2.x/docs/manual/misc/rewriteguide.xml
Date Fri, 07 Dec 2007 18:26:10 GMT
Author: rbowen
Date: Fri Dec  7 10:26:09 2007
New Revision: 602173

URL: http://svn.apache.org/viewvc?rev=602173&view=rev
Log:
Provide a recipe description, (from the 2.0 docs) and make the recipe match the
description.

Modified:
    httpd/httpd/branches/2.2.x/docs/manual/misc/rewriteguide.xml

Modified: httpd/httpd/branches/2.2.x/docs/manual/misc/rewriteguide.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/docs/manual/misc/rewriteguide.xml?rev=602173&r1=602172&r2=602173&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/docs/manual/misc/rewriteguide.xml (original)
+++ httpd/httpd/branches/2.2.x/docs/manual/misc/rewriteguide.xml Fri Dec  7 10:26:09 2007
@@ -131,19 +131,23 @@
       <dl>
         <dt>Description:</dt>
 
-        <dd>...</dd>
+        <dd>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 <strong>www.example.com</strong> instead of
+        <strong>example.com</strong>, you might use a variant of the
+        following recipe.</dd>
+
 
         <dt>Solution:</dt>
 
         <dd>
 <example><pre>
-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]
 </pre></example>
         </dd>
       </dl>



Mime
View raw message