You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rb...@apache.org on 2004/08/12 03:27:34 UTC
cvs commit: httpd-2.0/docs/manual/misc rewriteguide.html.en rewriteguide.xml
rbowen 2004/08/11 18:27:34
Modified: docs/manual/misc Tag: APACHE_2_0_BRANCH rewriteguide.html.en
rewriteguide.xml
Log:
Added a description for a recipe which has long been without one.
Revision Changes Path
No revision
No revision
1.4.2.11 +9 -1 httpd-2.0/docs/manual/misc/rewriteguide.html.en
Index: rewriteguide.html.en
===================================================================
RCS file: /home/cvs/httpd-2.0/docs/manual/misc/rewriteguide.html.en,v
retrieving revision 1.4.2.10
retrieving revision 1.4.2.11
diff -u -r1.4.2.10 -r1.4.2.11
--- rewriteguide.html.en 5 Aug 2004 11:28:38 -0000 1.4.2.10
+++ rewriteguide.html.en 12 Aug 2004 01:27:33 -0000 1.4.2.11
@@ -135,16 +135,24 @@
<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>
+# For sites running on a port other than 80
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]
+
+# And for a site running on port 80
RewriteCond %{HTTP_HOST} !^fully\.qualified\.domain\.name [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/(.*) http://fully.qualified.domain.name/$1 [L,R]
1.4.2.12 +10 -2 httpd-2.0/docs/manual/misc/rewriteguide.xml
Index: rewriteguide.xml
===================================================================
RCS file: /home/cvs/httpd-2.0/docs/manual/misc/rewriteguide.xml,v
retrieving revision 1.4.2.11
retrieving revision 1.4.2.12
diff -u -r1.4.2.11 -r1.4.2.12
--- rewriteguide.xml 3 Aug 2004 21:35:42 -0000 1.4.2.11
+++ rewriteguide.xml 12 Aug 2004 01:27:34 -0000 1.4.2.12
@@ -130,16 +130,24 @@
<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>
+# For sites running on a port other than 80
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]
+
+# And for a site running on port 80
RewriteCond %{HTTP_HOST} !^fully\.qualified\.domain\.name [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/(.*) http://fully.qualified.domain.name/$1 [L,R]