Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 8252 invoked from network); 3 Aug 2004 21:33:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 3 Aug 2004 21:33:26 -0000 Received: (qmail 77068 invoked by uid 500); 3 Aug 2004 21:33:25 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 76801 invoked by uid 500); 3 Aug 2004 21:33:22 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 76774 invoked by uid 500); 3 Aug 2004 21:33:21 -0000 Delivered-To: apmail-apache-1.3-cvs@apache.org Received: (qmail 76769 invoked by uid 500); 3 Aug 2004 21:33:21 -0000 Delivered-To: apmail-httpd-docs-1.3-cvs@apache.org Received: (qmail 76765 invoked by uid 99); 3 Aug 2004 21:33:21 -0000 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.27.1) with SMTP; Tue, 03 Aug 2004 14:33:18 -0700 Received: (qmail 8208 invoked by uid 1174); 3 Aug 2004 21:33:17 -0000 Date: 3 Aug 2004 21:33:17 -0000 Message-ID: <20040803213317.8207.qmail@minotaur.apache.org> From: rbowen@apache.org To: httpd-docs-1.3-cvs@apache.org Subject: cvs commit: httpd-docs-1.3/htdocs/manual/misc rewriteguide.html X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N rbowen 2004/08/03 14:33:17 Modified: htdocs/manual/misc rewriteguide.html Log: A few gramatical tweaks, and the introduction of some actual text instead of a "..." which has been there For All Time. Revision Changes Path 1.20 +12 -4 httpd-docs-1.3/htdocs/manual/misc/rewriteguide.html Index: rewriteguide.html =================================================================== RCS file: /home/cvs/httpd-docs-1.3/htdocs/manual/misc/rewriteguide.html,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- rewriteguide.html 7 Jul 2003 21:32:12 -0000 1.19 +++ rewriteguide.html 3 Aug 2004 21:33:17 -0000 1.20 @@ -29,15 +29,15 @@

This document supplements the mod_rewrite reference documentation. It describes how one can use Apache's mod_rewrite to solve - typical URL-based problems webmasters are usually confronted - with in practice. I give detailed descriptions on how to + typical URL-based problems with which webmasters are often + confronted. We give detailed descriptions on how to solve each problem by configuring URL rewriting rulesets.

Introduction to mod_rewrite

The Apache module mod_rewrite is a killer one, i.e. it is a really sophisticated module which provides a powerful way to - do URL manipulations. With it you can nearly do all types of + do URL manipulations. With it you can do nearly all types of URL manipulations you ever dreamed about. The price you have to pay is to accept complexity, because mod_rewrite's major drawback is that it is not easy to understand and use for the @@ -114,7 +114,12 @@
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:
@@ -124,10 +129,13 @@
  +# 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]