httpd-cvs mailing list archives

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

URL: http://svn.apache.org/viewvc?rev=602177&view=rev
Log:
Rebuild HTML from XML changes.

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

Modified: httpd/httpd/branches/2.2.x/docs/manual/misc/rewriteguide.html.en
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/docs/manual/misc/rewriteguide.html.en?rev=602177&r1=602176&r2=602177&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/docs/manual/misc/rewriteguide.html.en (original)
+++ httpd/httpd/branches/2.2.x/docs/manual/misc/rewriteguide.html.en Fri Dec  7 10:55:58 2007
@@ -135,19 +135,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>
 <div class="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></div>
         </dd>
       </dl>



Mime
View raw message