httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rbo...@apache.org
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 GMT
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 @@
           ``<code>|</code>'' 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:</p>
+          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.</p>
+          <p>Example:</p>
 
-<div class="example"><pre>
+<div class="example"><h3>Rewrite map file</h3><pre>
 ##
 ##  map.txt -- rewriting map
 ##
@@ -862,8 +864,12 @@
 dynamic  www5|www6
 </pre></div>
 
-<div class="example"><p><code>
-RewriteMap servers rnd:/path/to/file/map.txt
+<div class="example"><h3>Configuration directives</h3><p><code>
+RewriteMap servers rnd:/path/to/file/map.txt<br />
+<br />
+RewriteRule ^/(.*\.(png|gif|jpg)) http://${servers:static}/$1
+[NC,P,L]<br />
+RewriteRule ^/(.*) http://${servers:dynamic}/$1 [P,L]
 </code></p></div>
         </li>
 

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 @@
           ``<code>|</code>'' 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:</p>
+          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.</p>
+          <p>Example:</p>
 
-<example>
+<example><title>Rewrite map file</title>
 <pre>
 ##
 ##  map.txt -- rewriting map
@@ -372,8 +374,12 @@
 </pre>
 </example>
 
-<example>
-RewriteMap servers rnd:/path/to/file/map.txt
+<example><title>Configuration directives</title>
+RewriteMap servers rnd:/path/to/file/map.txt<br />
+<br />
+RewriteRule ^/(.*\.(png|gif|jpg)) http://${servers:static}/$1
+[NC,P,L]<br />
+RewriteRule ^/(.*) http://${servers:dynamic}/$1 [P,L]
 </example>
         </li>
 



Mime
View raw message