Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 87584 invoked from network); 26 Jun 2005 23:35:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 26 Jun 2005 23:35:10 -0000 Received: (qmail 11002 invoked by uid 500); 26 Jun 2005 23:35:10 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 10829 invoked by uid 500); 26 Jun 2005 23:35:09 -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: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 10816 invoked by uid 99); 26 Jun 2005 23:35:09 -0000 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=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.29) with SMTP; Sun, 26 Jun 2005 16:35:08 -0700 Received: (qmail 87488 invoked by uid 65534); 26 Jun 2005 23:35:06 -0000 Message-ID: <20050626233506.87487.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r201923 - in /httpd/httpd/trunk/docs/manual/mod: mod_rewrite.html.en mod_rewrite.xml Date: Sun, 26 Jun 2005 23:35:06 -0000 To: cvs@httpd.apache.org From: rbowen@apache.org X-Mailer: svnmailer-1.0.2 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: rbowen Date: Sun Jun 26 16:35:05 2005 New Revision: 201923 URL: http://svn.apache.org/viewcvs?rev=201923&view=rev Log: Add more detail to the RewriteMap rnd: example, as well as rewriting some of the text that makes this feature seem less useful than it actually is. Modified: httpd/httpd/trunk/docs/manual/mod/mod_rewrite.html.en httpd/httpd/trunk/docs/manual/mod/mod_rewrite.xml Modified: httpd/httpd/trunk/docs/manual/mod/mod_rewrite.html.en URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/docs/manual/mod/mod_rewrite.html.en?rev=201923&r1=201922&r2=201923&view=diff ============================================================================== --- httpd/httpd/trunk/docs/manual/mod/mod_rewrite.html.en (original) +++ httpd/httpd/trunk/docs/manual/mod/mod_rewrite.html.en Sun Jun 26 16:35:05 2005 @@ -848,12 +848,14 @@ ``|'' characters which have the meaning of ``or''. In other words they indicate a set of alternatives from which the actual returned value is - chosen randomly. Although this sounds crazy and useless, - it was actually designed for load balancing in a reverse - proxy situation where the looked up values are server - names. Example:

+ chosen randomly. For example, you might use the following map + file and directives to provide a random load balancing between + several back-end server, via a reverse-proxy. Images are sent + to one of the servers in the 'static' pool, while everything + else is sent to one of the 'dynamic' pool.

+

Example:

-
+

Rewrite map file

 ##
 ##  map.txt -- rewriting map
 ##
@@ -862,8 +864,12 @@
 dynamic  www5|www6
 
-

-RewriteMap servers rnd:/path/to/file/map.txt +

Configuration directives

+RewriteMap servers rnd:/path/to/file/map.txt
+
+RewriteRule ^/(.*\.(png|gif|jpg)) http://${servers:static}/$1 +[NC,P,L]
+RewriteRule ^/(.*) http://${servers:dynamic}/$1 [P,L]

Modified: httpd/httpd/trunk/docs/manual/mod/mod_rewrite.xml URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/docs/manual/mod/mod_rewrite.xml?rev=201923&r1=201922&r2=201923&view=diff ============================================================================== --- httpd/httpd/trunk/docs/manual/mod/mod_rewrite.xml (original) +++ httpd/httpd/trunk/docs/manual/mod/mod_rewrite.xml Sun Jun 26 16:35:05 2005 @@ -356,12 +356,14 @@ ``|'' characters which have the meaning of ``or''. In other words they indicate a set of alternatives from which the actual returned value is - chosen randomly. Although this sounds crazy and useless, - it was actually designed for load balancing in a reverse - proxy situation where the looked up values are server - names. Example:

+ chosen randomly. For example, you might use the following map + file and directives to provide a random load balancing between + several back-end server, via a reverse-proxy. Images are sent + to one of the servers in the 'static' pool, while everything + else is sent to one of the 'dynamic' pool.

+

Example:

- +Rewrite map file
 ##
 ##  map.txt -- rewriting map
@@ -372,8 +374,12 @@
 
- -RewriteMap servers rnd:/path/to/file/map.txt +Configuration directives +RewriteMap servers rnd:/path/to/file/map.txt
+
+RewriteRule ^/(.*\.(png|gif|jpg)) http://${servers:static}/$1 +[NC,P,L]
+RewriteRule ^/(.*) http://${servers:dynamic}/$1 [P,L]