httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject svn commit: r1333985 - /httpd/httpd/branches/2.4.x/docs/manual/rewrite/
Date Fri, 04 May 2012 14:25:33 GMT
Author: humbedooh
Date: Fri May  4 14:25:32 2012
New Revision: 1333985

URL: http://svn.apache.org/viewvc?rev=1333985&view=rev
Log:
Backporting syntax highlighting for rewrite/

Modified:
    httpd/httpd/branches/2.4.x/docs/manual/rewrite/access.xml
    httpd/httpd/branches/2.4.x/docs/manual/rewrite/advanced.xml
    httpd/httpd/branches/2.4.x/docs/manual/rewrite/avoid.xml
    httpd/httpd/branches/2.4.x/docs/manual/rewrite/flags.xml
    httpd/httpd/branches/2.4.x/docs/manual/rewrite/flags.xml.fr
    httpd/httpd/branches/2.4.x/docs/manual/rewrite/index.xml.fr
    httpd/httpd/branches/2.4.x/docs/manual/rewrite/index.xml.tr
    httpd/httpd/branches/2.4.x/docs/manual/rewrite/index.xml.zh-cn
    httpd/httpd/branches/2.4.x/docs/manual/rewrite/intro.xml
    httpd/httpd/branches/2.4.x/docs/manual/rewrite/intro.xml.fr
    httpd/httpd/branches/2.4.x/docs/manual/rewrite/proxy.xml
    httpd/httpd/branches/2.4.x/docs/manual/rewrite/remapping.xml
    httpd/httpd/branches/2.4.x/docs/manual/rewrite/rewritemap.xml
    httpd/httpd/branches/2.4.x/docs/manual/rewrite/tech.xml.fr
    httpd/httpd/branches/2.4.x/docs/manual/rewrite/vhosts.xml

Modified: httpd/httpd/branches/2.4.x/docs/manual/rewrite/access.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/docs/manual/rewrite/access.xml?rev=1333985&r1=1333984&r2=1333985&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/docs/manual/rewrite/access.xml (original)
+++ httpd/httpd/branches/2.4.x/docs/manual/rewrite/access.xml Fri May  4 14:25:32 2012
@@ -83,29 +83,29 @@ configuration.</note>
 
 <!-- TODO: Add discussion here of why we have !^$ in there. -->
 
-<example>
-RewriteCond %{HTTP_REFERER} <strong>!^$</strong><br />
-RewriteCond %{HTTP_REFERER} !www.example.com [NC]<br />
+<highlight language="config">
+RewriteCond %{HTTP_REFERER} <strong>!^$</strong>
+RewriteCond %{HTTP_REFERER} !www.example.com [NC]
 RewriteRule <strong>\.(gif|jpg|png)$</strong>    -   [F,NC]
-</example>
+</highlight>
 
     <p>In this second example, instead of failing the request, we display
     an alternate image instead.</p>
 
-<example>
-RewriteCond %{HTTP_REFERER} <strong>!^$</strong><br />
-RewriteCond %{HTTP_REFERER} !www.example.com [NC]<br />
+<highlight language="config">
+RewriteCond %{HTTP_REFERER} <strong>!^$</strong>
+RewriteCond %{HTTP_REFERER} !www.example.com [NC]
 RewriteRule <strong>\.(gif|jpg|png)$</strong>    /images/go-away.png   [R,NC]
-</example>
+</highlight>
 
     <p>In the third example, we redirect the request to an image on some
     other site.</p>
 
-<example>
-RewriteCond %{HTTP_REFERER} <strong>!^$</strong><br />
-RewriteCond %{HTTP_REFERER} !www.example.com [NC]<br />
+<highlight language="config">
+RewriteCond %{HTTP_REFERER} <strong>!^$</strong>
+RewriteCond %{HTTP_REFERER} !www.example.com [NC]
 RewriteRule <strong>\.(gif|jpg|png)$</strong> http://other.example.com/image.gif   [R,NC]
-</example>
+</highlight>
 
     <p>Of these techniques, the last two tend to be the most effective
     in getting people to stop hotlinking your images, because they will
@@ -120,14 +120,14 @@ RewriteRule <strong>\.(gif|jpg|png)$</st
         than redirecting that request elsewhere, this can be
         accomplished without the use of mod_rewrite:</p>
 
-        <example>
-        SetEnvIf Referer example\.com localreferer<br />
-        &lt;FilesMatch \.(jpg|png|gif)$&gt;<br />
-        Order deny,allow<br />
-        Deny from all<br />
-        Allow from env=localreferer<br />
-        &lt;/FilesMatch&gt;
-        </example>
+        <highlight language="config">
+SetEnvIf Referer example\.com localreferer
+&lt;FilesMatch \.(jpg|png|gif)$&gt;
+	Order deny,allow
+	Deny from all
+	Allow from env=localreferer
+&lt;/FilesMatch&gt;
+        </highlight>
         </dd>
       </dl>
 
@@ -170,11 +170,11 @@ RewriteRule <strong>\.(gif|jpg|png)$</st
         range, if you are trying to block that user agent only from the
         particular source.</p>
 
-<example>
-RewriteCond %{HTTP_USER_AGENT}   ^<strong>NameOfBadRobot</strong><br />
-RewriteCond %{REMOTE_ADDR}       =<strong>123\.45\.67\.[8-9]</strong><br />
+<highlight language="config">
+RewriteCond %{HTTP_USER_AGENT}   ^<strong>NameOfBadRobot</strong>
+RewriteCond %{REMOTE_ADDR}       =<strong>123\.45\.67\.[8-9]</strong>
 RewriteRule ^<strong>/secret/files/</strong>   -   [<strong>F</strong>]
-</example>
+</highlight>
         </dd>
 
       <dt>Discussion:</dt>
@@ -184,14 +184,14 @@ RewriteRule ^<strong>/secret/files/</str
         Rather than using mod_rewrite for this, you can accomplish the
         same end using alternate means, as illustrated here:
       </p>
-      <example>
-      SetEnvIfNoCase User-Agent ^NameOfBadRobot goaway<br />
-      &lt;Location /secret/files&gt;<br />
-      Order allow,deny<br />
-      Allow from all<br />
-      Deny from env=goaway<br />
-      &lt;/Location&gt;
-      </example>
+      <highlight language="config">
+SetEnvIfNoCase User-Agent ^NameOfBadRobot goaway
+&lt;Location /secret/files&gt;
+    Order allow,deny
+    Allow from all
+    Deny from env=goaway
+&lt;/Location&gt;
+      </highlight>
       <p>
       As noted above, this technique is trivial to circumvent, by simply
       modifying the <code>USER_AGENT</code> request header. If you
@@ -221,13 +221,13 @@ RewriteRule ^<strong>/secret/files/</str
     <dt>Solution:</dt>
 
     <dd>
-<example>
-RewriteEngine on<br />
-RewriteMap    hosts-deny  txt:/path/to/hosts.deny<br />
-RewriteCond   ${hosts-deny:%{REMOTE_ADDR}|NOT-FOUND} !=NOT-FOUND [OR]<br />
-RewriteCond   ${hosts-deny:%{REMOTE_HOST}|NOT-FOUND} !=NOT-FOUND<br />
+<highlight language="config">
+RewriteEngine on
+RewriteMap    hosts-deny  txt:/path/to/hosts.deny
+RewriteCond   ${hosts-deny:%{REMOTE_ADDR}|NOT-FOUND} !=NOT-FOUND [OR]
+RewriteCond   ${hosts-deny:%{REMOTE_HOST}|NOT-FOUND} !=NOT-FOUND
 RewriteRule   ^  -  [F]
-</example>
+</highlight>
 
 <example>
 ##<br />
@@ -275,17 +275,17 @@ bsdti1.sdm.de  -<br />
   <p>The following ruleset uses a map file to associate each Referer
   with a redirection target.</p>
 
-<example>
-RewriteMap  deflector txt:/path/to/deflector.map<br />
-<br />
-RewriteCond %{HTTP_REFERER} !=""<br />
-RewriteCond ${deflector:%{HTTP_REFERER}} =-<br />
-RewriteRule ^ %{HTTP_REFERER} [R,L]<br />
-<br />
-RewriteCond %{HTTP_REFERER} !=""<br />
-RewriteCond ${deflector:%{HTTP_REFERER}|NOT-FOUND} !=NOT-FOUND<br />
+<highlight language="config">
+RewriteMap  deflector txt:/path/to/deflector.map
+
+RewriteCond %{HTTP_REFERER} !=""
+RewriteCond ${deflector:%{HTTP_REFERER}} =-
+RewriteRule ^ %{HTTP_REFERER} [R,L]
+
+RewriteCond %{HTTP_REFERER} !=""
+RewriteCond ${deflector:%{HTTP_REFERER}|NOT-FOUND} !=NOT-FOUND
 RewriteRule ^ ${deflector:%{HTTP_REFERER}} [R,L]
-</example>
+</highlight>
 
       <p>The map file lists redirection targets for each referer, or, if
       we just wish to redirect back to where they came from, a "-" is

Modified: httpd/httpd/branches/2.4.x/docs/manual/rewrite/advanced.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/docs/manual/rewrite/advanced.xml?rev=1333985&r1=1333984&r2=1333985&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/docs/manual/rewrite/advanced.xml (original)
+++ httpd/httpd/branches/2.4.x/docs/manual/rewrite/advanced.xml Fri May  4 14:25:32 2012
@@ -92,13 +92,13 @@ http://physical_host_of_user1/u/user/any
       files assuming that server0 is a default server which will be used if
       a user has no entry in the map:</p>
 
-<example>
-RewriteEngine on<br />
-<br />
-RewriteMap      users-to-hosts   txt:/path/to/map.users-to-hosts<br />
-<br />
+<highlight language="config">
+RewriteEngine on
+
+RewriteMap      users-to-hosts   txt:/path/to/map.users-to-hosts
+
 RewriteRule   ^/u/<strong>([^/]+)</strong>/?(.*)   http://<strong>${users-to-hosts:$1|server0}</strong>/u/$1/$2
-</example>
+</highlight>
     </dd>
   </dl>
 
@@ -127,11 +127,11 @@ RewriteRule   ^/u/<strong>([^/]+)</stron
     <dd>
       This is done via the following ruleset:
 
-<example>
-# This example is valid in per-directory context only<br />
-RewriteCond %{REQUEST_URI}   <strong>!-U</strong><br />
+<highlight language="config">
+# This example is valid in per-directory context only
+RewriteCond %{REQUEST_URI}   <strong>!-U</strong>
 RewriteRule ^(.+)\.html$          /regenerate_page.cgi   [PT,L]
-</example>
+</highlight>
 
     <p>The <code>-U</code> operator determines whether the test string
     (in this case, <code>REQUEST_URI</code>) is a valid URL. It does
@@ -169,12 +169,12 @@ RewriteRule ^(.+)\.html$          /regen
       module="mod_rewrite">RewriteMap</directive> and a list of servers
       to accomplish this.</p>
 
-<example>
-RewriteEngine on<br />
-RewriteMap lb rnd:/path/to/serverlist.txt<br />
-<br />
+<highlight language="config">
+RewriteEngine on
+RewriteMap lb rnd:/path/to/serverlist.txt
+
 RewriteRule ^/(.*) http://${lb:servers}/$1 [P,L]
-</example>
+</highlight>
 
 <p><code>serverlist.txt</code> will contain a list of the servers:</p>
 
@@ -230,9 +230,9 @@ nph-refresh techniques.
       URL causes the 'page' to be refreshed every time it is
       updated on the filesystem.</p>
 
-<example>
+<highlight language="config">
 RewriteRule   ^(/[uge]/[^/]+/?.*):refresh  /internal/cgi/apache/nph-refresh?f=$1
-</example>
+</highlight>
 
       <p>Now when we reference the URL</p>
 
@@ -250,7 +250,7 @@ RewriteRule   ^(/[uge]/[^/]+/?.*):refres
       one would usually say "left as an exercise to the reader"
       ;-) I will provide this, too.</p>
 
-<example><pre>
+<highlight language="perl">
 #!/sw/bin/perl
 ##
 ##  nph-refresh -- NPH/CGI script for auto refreshing pages
@@ -272,13 +272,13 @@ $QS_n = 3600 if ($QS_n eq '');
 if ($QS_f eq '') {
 print "HTTP/1.0 200 OK\n";
 print "Content-type: text/html\n\n";
-print "&amp;lt;b&amp;gt;ERROR&amp;lt;/b&amp;gt;: No file given\n";
+print "&lt;b&gt;ERROR&lt;/b&gt;: No file given\n";
 exit(0);
 }
 if (! -f $QS_f) {
 print "HTTP/1.0 200 OK\n";
 print "Content-type: text/html\n\n";
-print "&amp;lt;b&amp;gt;ERROR&amp;lt;/b&amp;gt;: File $QS_f not found\n";
+print "&lt;b&gt;ERROR&lt;/b&gt;: File $QS_f not found\n";
 exit(0);
 }
 
@@ -310,7 +310,7 @@ local($file) = @_;
 local(*FP, $size, $buffer, $bytes);
 ($x, $x, $x, $x, $x, $x, $x, $size) = stat($file);
 $size = sprintf("%d", $size);
-open(FP, "&amp;lt;$file");
+open(FP, "&lt;$file");
 $bytes = sysread(FP, $buffer, $size);
 close(FP);
 return $buffer;
@@ -352,7 +352,7 @@ while (1) {
 exit(0);
 
 ##EOF##
-</pre></example>
+</highlight>
     </dd>
   </dl>
 
@@ -381,10 +381,10 @@ exit(0);
       <p>We use the following ruleset to expand the tilde URLs
       into the above layout.</p>
 
-<example>
-RewriteEngine on<br />
+<highlight language="config">
+RewriteEngine on
 RewriteRule   ^/~(<strong>([a-z])</strong>[a-z0-9]+)(.*)  /home/<strong>$2</strong>/$1/public_html$3
-</example>
+</highlight>
     </dd>
   </dl>
 
@@ -440,13 +440,13 @@ RewriteRule   ^/~(<strong>([a-z])</stron
       <code>&gt;STRING</code> and <code>=STRING</code> we can
       do time-dependent redirects:</p>
 
-<example>
-RewriteEngine on<br />
-RewriteCond   %{TIME_HOUR}%{TIME_MIN} &gt;0700<br />
-RewriteCond   %{TIME_HOUR}%{TIME_MIN} &lt;1900<br />
-RewriteRule   ^foo\.html$             foo.day.html [L]<br />
+<highlight language="config">
+RewriteEngine on
+RewriteCond   %{TIME_HOUR}%{TIME_MIN} &gt;0700
+RewriteCond   %{TIME_HOUR}%{TIME_MIN} &lt;1900
+RewriteRule   ^foo\.html$             foo.day.html [L]
 RewriteRule   ^foo\.html$             foo.night.html
-</example>
+</highlight>
 
       <p>This provides the content of <code>foo.day.html</code>
       under the URL <code>foo.html</code> from
@@ -485,17 +485,17 @@ RewriteRule   ^foo\.html$             fo
     <dd>
       <p>Use the [E] flag to set an environment variable.</p>
 
-<example>
-RewriteEngine on<br />
+<highlight language="config">
+RewriteEngine on
 RewriteRule   ^/horse/(.*)   /pony/$1 [E=<strong>rewritten:1</strong>]
-</example>
+</highlight>
 
     <p>Later in your ruleset you might check for this environment
     variable using a RewriteCond:</p>
 
-<example>
+<highlight language="config">
 RewriteCond %{ENV:rewritten} =1
-</example>
+</highlight>
 
     <p>Note that environment variables do not survive an external
     redirect. You might consider using the [CO] flag to set a

Modified: httpd/httpd/branches/2.4.x/docs/manual/rewrite/avoid.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/docs/manual/rewrite/avoid.xml?rev=1333985&r1=1333984&r2=1333985&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/docs/manual/rewrite/avoid.xml (original)
+++ httpd/httpd/branches/2.4.x/docs/manual/rewrite/avoid.xml Fri May  4 14:25:32 2012
@@ -90,25 +90,22 @@ and <code>/one/three/four.html</code>.</
 <p>To redirect URLs under <code>/one</code> to
 <code>http://one.example.com</code>, do the following:</p>
 
-<example>
-Redirect /one/ http://one.example.com/
-</example>
+<highlight language="config">Redirect /one/ http://one.example.com/</highlight>
 
 <p>To redirect <code>http</code> URLs to <code>https</code>, do the
 following:</p>
 
-<example>
+<highlight language="config">
 &lt;VirtualHost *:80&gt;
-ServerName www.example.com<br />
-Redirect / https://www.example.com/<br />
+    ServerName www.example.com
+    Redirect / https://www.example.com/
 &lt;/VirtualHost &gt;
-<br />
+
 &lt;VirtualHost *:443&gt;
-ServerName www.example.com<br />
-<br />
-# ... SSL configuration goes here<br />
+    ServerName www.example.com
+    # ... SSL configuration goes here
 &lt;/VirtualHost &gt;
-</example>
+</highlight>
 
 <p>The use of <code>RewriteRule</code> to perform this task may be
 appropriate if there are other <code>RewriteRule</code> directives in
@@ -133,7 +130,7 @@ is possible to perform this mapping with
 and performance.</p>
 
 <example><title>Using Alias</title>
-Alias /cats /var/www/virtualhosts/felines/htdocs
+<highlight language="config">Alias /cats /var/www/virtualhosts/felines/htdocs</highlight>
 </example>
 
 <p>
@@ -175,18 +172,18 @@ seems like the right approach.</p>
 href="flags.html#flag_p">[P]</a> flag to pass rewritten URIs through
 <module>mod_proxy</module>.</p>
 
-<example>
+<highlight language="config">
 RewriteRule ^/?images(.*) http://imageserver.local/images$1 [P]
-</example>
+</highlight>
 
 <p>However, in many cases, when there is no actual pattern matching
 needed, as in the example shown above, the <directive
 module="mod_proxy">ProxyPass</directive> directive is a better choice.
 The example here could be rendered as:</p>
 
-<example>
+<highlight language="config">
 ProxyPass /images/ http://imageserver.local/images/
-</example>
+</highlight>
 
 <p>Note that whether you use <directive
 module="mod_rewrite">RewriteRule</directive> or <directive
@@ -194,9 +191,9 @@ module="mod_proxy">ProxyPass</directive>
 <directive module="mod_proxy">ProxyPassReverse</directive> directive to
 catch redirects issued from the back-end server:</p>
 
-<example>
+<highlight language="config">
 ProxyPassReverse /images/ http://imageserver.local/images/
-</example>
+</highlight>
 
 <p>You may need to use <code>RewriteRule</code> instead when there are
 other <code>RewriteRule</code>s in effect in the same scope, as a
@@ -219,11 +216,11 @@ hostname, such as <code>www.example.com<
 <code>example.com</code>. This can be done using the <directive
 module="core" type="section">If</directive> directive, as shown here:</p>
 
-<example>
-&lt;If "$req{Host} != 'www.example.com'"&gt;<br />
-RedirectMatch (.*) http://www.example.com$1<br />
+<highlight language="config">
+&lt;If "req('Host') != 'www.example.com'"&gt;
+    Redirect / http://www.example.com/
 &lt;/If&gt;
-</example>
+</highlight>
 
 <p>This technique can be used to take actions based on any request
 header, response header, or environment variable, replacing

Modified: httpd/httpd/branches/2.4.x/docs/manual/rewrite/flags.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/docs/manual/rewrite/flags.xml?rev=1333985&r1=1333984&r2=1333985&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/docs/manual/rewrite/flags.xml (original)
+++ httpd/httpd/branches/2.4.x/docs/manual/rewrite/flags.xml Fri May  4 14:25:32 2012
@@ -46,9 +46,7 @@ providing detailed explanations and exam
 its behavior modified by one or more flags. Flags are included in
 square brackets at the end of the rule, and multiple flags are separated
 by commas.</p>
-<example>
-RewriteRule pattern target [Flag1,Flag2,Flag3]
-</example>
+<highlight language="config">RewriteRule pattern target [Flag1,Flag2,Flag3]</highlight>
 
 <p>The flags all have a short form, such as <code>CO</code>, as well as
 a longer form, such as <code>cookie</code>. Some flags take one or more
@@ -79,9 +77,7 @@ so backreferences will be unescaped at t
 Using the B flag, non-alphanumeric characters in backreferences
 will be escaped. For example, consider the rule:</p>
 
-<example>
-RewriteRule ^search/(.*)$ /search.php?term=$1
-</example>
+<highlight language="config">RewriteRule ^search/(.*)$ /search.php?term=$1</highlight>
 
 <p>Given a search term of 'x &amp; y/z', a browser will encode it as
 'x%20%26%20y%2Fz', making the request 'search/x%20%26%20y%2Fz'. Without the B
@@ -167,10 +163,10 @@ browsers that support this feature.</dd>
 
 <p>Several examples are offered here:</p>
 
-<example>
-RewriteEngine On<br />
+<highlight language="config">
+RewriteEngine On
 RewriteRule ^/index\.html - [CO=frontdoor:yes:.example.com:1440:/]
-</example>
+</highlight>
 
 <p>In the example give, the rule doesn't rewrite the request.
 The "-" rewrite target tells mod_rewrite to pass the request
@@ -255,17 +251,17 @@ value of '1' if the requested URI is an 
 environment variable is used to exclude those requests from the access
 log.</p>
 
-<example>
-RewriteRule \.(png|gif|jpg) - [E=image:1]<br />
+<highlight language="config">
+RewriteRule \.(png|gif|jpg)$ - [E=image:1]
 CustomLog logs/access_log combined env=!image
-</example>
+</highlight>
 
 <p>Note that this same effect can be obtained using <directive
 module="mod_setenvif">SetEnvIf</directive>. This technique is offered as
 an example, not as a recommendation.</p>
 </section>
 
-<section id="flag_end"><title>END</title>
+<section id="flag_end"><title>END</title> 
 <p>Using the [END] flag terminates not only the current round of rewrite
 processing (like [L]) but also prevents any subsequent rewrite
 processing from occurring in per-directory (htaccess) context.</p>
@@ -283,9 +279,7 @@ allows more flexibility in assigning a F
 <p>The following rule will forbid <code>.exe</code> files from being
 downloaded from your server.</p>
 
-<example>
-RewriteRule \.exe - [F]
-</example>
+<highlight language="config">RewriteRule \.exe - [F]</highlight>
 
 <p>This example uses the "-" syntax for the rewrite target, which means
 that the requested URI is not modified. There's no reason to rewrite to
@@ -304,9 +298,7 @@ longer available.</p>
 <p>As with the [F] flag, you will typically use the "-" syntax for the
 rewrite target when using the [G] flag:</p>
 
-<example>
-RewriteRule oldproduct - [G,NC]
-</example>
+<highlight language="config">RewriteRule oldproduct - [G,NC]</highlight>
 
 <p>When using [G], an [L] is implied - that is, the response is returned
 immediately, and no further rules are evaluated.</p>
@@ -318,9 +310,7 @@ immediately, and no further rules are ev
 handler. For example, one might use this to force all files without a
 file extension to be parsed by the php handler:</p>
 
-<example>
-RewriteRule !\. - [H=application/x-httpd-php]
-</example>
+<highlight language="config">RewriteRule !\. - [H=application/x-httpd-php]</highlight>
 
 <p>
 The regular expression above - <code>!\.</code> - will match any request
@@ -332,9 +322,9 @@ For example, the following snippet used 
 <code>.php</code> files to be <em>displayed</em> by <code>mod_php</code>
 if they are requested with the <code>.phps</code> extension:</p>
 
-<example>
+<highlight language="config">
 RewriteRule ^(/source/.+\.php)s$ $1 [H=application/x-httpd-php-source]
-</example>
+</highlight>
 
 <p>The regular expression above - <code>^(/source/.+\.php)s$</code> - will
 match any request that starts with <code>/source/</code> followed by 1 or
@@ -385,11 +375,11 @@ module="mod_rewrite">RewriteCond</direct
 is already for <code>index.php</code>, the <directive
 module="mod_rewrite">RewriteRule</directive> will be skipped.</p>
 
-<example>
-RewriteBase /<br />
-RewriteCond %{REQUEST_URI} !=/index.php<br />
+<highlight language="config">
+RewriteBase /
+RewriteCond %{REQUEST_URI} !=/index.php
 RewriteRule ^(.*) /index.php?req=$1 [L,PT]
-</example>
+</highlight>
 </section>
 
 <section id="flag_n"><title>N|next</title>
@@ -405,9 +395,7 @@ will replace A with B everywhere in a re
 so until there are no more As to be replaced.
 </p>
 
-<example>
-RewriteRule (.*)A(.*) $1B$2 [N]
-</example>
+<highlight language="config">RewriteRule (.*)A(.*) $1B$2 [N]</highlight>
 
 <p>You can think of this as a <code>while</code> loop: While this
 pattern still matches (i.e., while the URI still contains an
@@ -427,9 +415,7 @@ to your dedicated image server. The matc
 <code>.jpg</code> and <code>.JPG</code> files are both acceptable, for
 example.</p>
 
-<example>
-RewriteRule (.*\.(jpg|gif|png))$ http://images.example.com$1 [P,NC]
-</example>
+<highlight language="config">RewriteRule (.*\.(jpg|gif|png))$ http://images.example.com$1 [P,NC]</highlight>
 </section>
 
 <section id="flag_ne"><title>NE|noescape</title>
@@ -438,9 +424,7 @@ RewriteRule (.*\.(jpg|gif|png))$ http://
 equivalent. Using the [NE] flag prevents that from happening.
 </p>
 
-<example>
-RewriteRule ^/anchor/(.+) /bigpage.html#$1 [NE,R]
-</example>
+<highlight language="config">RewriteRule ^/anchor/(.+) /bigpage.html#$1 [NE,R]</highlight>
 
 <p>
 The above example will redirect <code>/anchor/xyz</code> to
@@ -481,9 +465,7 @@ requests.
 example, if you wanted all image requests to be handled by a back-end
 image server, you might do something like the following:</p>
 
-<example>
-RewriteRule /(.*)\.(jpg|gif|png) http://images.example.com/$1.$2 [P]
-</example>
+<highlight language="config">RewriteRule /(.*)\.(jpg|gif|png)$ http://images.example.com/$1.$2 [P]</highlight>
 
 <p>Use of the [P] flag implies [L] - that is, the request is immediately
 pushed through the proxy, and any following rules will not be
@@ -536,10 +518,10 @@ use the [PT] flag to ensure that the
 <directive module="mod_alias">Alias</directive> is evaluated.
 </p>
 
-<example>
-Alias /icons /usr/local/apache/icons<br />
-RewriteRule /pics/(.+)\.jpg /icons/$1.gif [PT]
-</example>
+<highlight language="config">
+Alias /icons /usr/local/apache/icons
+RewriteRule /pics/(.+)\.jpg$ /icons/$1.gif [PT]
+</highlight>
 
 <p>
 Omission of the [PT] flag in this case will cause the Alias to be
@@ -568,9 +550,7 @@ Using the [QSA] flag causes the query st
 
 <p>Consider the following rule:</p>
 
-<example>
-RewriteRule /pages/(.+) /page.php?page=$1 [QSA]
-</example>
+<highlight language="config">RewriteRule /pages/(.+) /page.php?page=$1 [QSA]</highlight>
 
 <p>With the [QSA] flag, a request for <code>/pages/123?one=two</code> will be
 mapped to <code>/page.php?page=123&amp;one=two</code>. Without the [QSA]
@@ -646,16 +626,16 @@ statement in your rewrite ruleset. In th
 to run the <directive module="mod_rewrite">RewriteRule</directive> if the 
 requested URI doesn't correspond with an actual file.</p>
 
-<example>
-# Is the request for a non-existent file?<br />
-RewriteCond %{REQUEST_FILENAME} !-f<br />
-RewriteCond %{REQUEST_FILENAME} !-d<br />
-# If so, skip these two RewriteRules<br />
-RewriteRule .? - [S=2]<br />
-<br />
-RewriteRule (.*\.gif) images.php?$1<br />
+<highlight language="config">
+# Is the request for a non-existent file?
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteCond %{REQUEST_FILENAME} !-d
+# If so, skip these two RewriteRules
+RewriteRule .? - [S=2]
+
+RewriteRule (.*\.gif) images.php?$1
 RewriteRule (.*\.html) docs.php?$1
-</example>
+</highlight>
 
 <p>This technique is useful because a <directive
 module="mod_rewrite">RewriteCond</directive> only applies to the
@@ -666,26 +646,22 @@ negate those conditions and add a <code>
 use this to make pseudo if-then-else constructs: The last rule of
 the then-clause becomes <code>skip=N</code>, where N is the
 number of rules in the else-clause:</p>
-<example>
-# Does the file exist?<br />
-RewriteCond %{REQUEST_FILENAME} !-f<br />
-RewriteCond %{REQUEST_FILENAME} !-d<br />
-# Create an if-then-else construct by skipping 3 lines if we meant to go to the &quot;else&quot; stanza.<br />
-RewriteRule .? - [S=3]<br />
-<br />
+<highlight language="config">
+# Does the file exist?
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteCond %{REQUEST_FILENAME} !-d
+# Create an if-then-else construct by skipping 3 lines if we meant to go to the &quot;else&quot; stanza.
+RewriteRule .? - [S=3]
+
 # IF the file exists, then:
-<indent>
-	RewriteRule (.*\.gif) images.php?$1<br />
-	RewriteRule (.*\.html) docs.php?$1<br />
-	# Skip past the &quot;else&quot; stanza.<br />
-	RewriteRule .? - [S=1]<br />
-</indent>
+    RewriteRule (.*\.gif) images.php?$1
+    RewriteRule (.*\.html) docs.php?$1
+    # Skip past the &quot;else&quot; stanza.
+    RewriteRule .? - [S=1]
 # ELSE...
-<indent>
-	RewriteRule (.*) 404.php?file=$1<br />
-</indent>
+    RewriteRule (.*) 404.php?file=$1
 # END
-</example>
+</highlight>
 
 <p>It is probably easier to accomplish this kind of configuration using
 the <directive type="section">If</directive>, <directive
@@ -702,19 +678,19 @@ module="mod_mime">AddType</directive> di
 <p>For example, you might use the following technique to serve Perl
 source code as plain text, if requested in a particular way:</p>
 
-<example>
-# Serve .pl files as plain text<br />
+<highlight language="config">
+# Serve .pl files as plain text
 RewriteRule \.pl$ - [T=text/plain]
-</example>
+</highlight>
 
 <p>Or, perhaps, if you have a camera that produces jpeg images without
 file extensions, you could force those images to be served with the
 correct MIME type by virtue of their file names:</p>
 
-<example>
-# Files with 'IMG' in the name are jpg images.<br />
+<highlight language="config">
+# Files with 'IMG' in the name are jpg images.
 RewriteRule IMG - [T=image/jpg]
-</example>
+</highlight>
 
 <p>Please note that this is a trivial example, and could be better done
 using <directive type="section" module="core">FilesMatch</directive>

Modified: httpd/httpd/branches/2.4.x/docs/manual/rewrite/flags.xml.fr
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/docs/manual/rewrite/flags.xml.fr?rev=1333985&r1=1333984&r2=1333985&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/docs/manual/rewrite/flags.xml.fr (original)
+++ httpd/httpd/branches/2.4.x/docs/manual/rewrite/flags.xml.fr Fri May  4 14:25:32 2012
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="ISO-8859-1" ?>
 <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.fr.xsl"?>
-<!-- English Revision : 1311809 -->
+<!-- English Revision: 1311806:1332585 (outdated) -->
 <!-- French translation : Lucien GENTIS -->
 <!-- Reviewed by : Vincent Deffontaines -->
 
@@ -711,7 +711,7 @@ RewriteRule (.*\.html) docs.php?$1
 qu'&agrave; la r&egrave;gle qui la suit imm&eacute;diatement. Ainsi, si vous voulez
 qu'une directive <code>RewriteCond</code> s'applique &agrave; plusieurs r&egrave;gles
 <code>RewriteRule</code>, une technique possible consiste &agrave; inverser ces
-conditions et &agrave; ajouter une <code>RewriteRule</code> avec le drapeau [Skip]. Cette technique permet
+conditions et ajouter une <code>RewriteRule</code> avec le drapeau [Skip]. Cette technique permet
 d'&eacute;laborer des pseudo-constructions if-then-else : la derni&egrave;re r&egrave;gle du
 bloc then contiendra <code>skip=N</code>, o&ugrave; N est le nombre de r&egrave;gles
 contenues dans le bloc else :</p>

Modified: httpd/httpd/branches/2.4.x/docs/manual/rewrite/index.xml.fr
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/docs/manual/rewrite/index.xml.fr?rev=1333985&r1=1333984&r2=1333985&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/docs/manual/rewrite/index.xml.fr (original)
+++ httpd/httpd/branches/2.4.x/docs/manual/rewrite/index.xml.fr Fri May  4 14:25:32 2012
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="ISO-8859-1" ?>
 <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.fr.xsl"?>
-<!-- English Revision : 1328305 -->
+<!-- English Revision : 1328303 -->
 <!-- French translation : Lucien GENTIS -->
 <!-- Reviewed by : Vincent Deffontaines -->
 

Modified: httpd/httpd/branches/2.4.x/docs/manual/rewrite/index.xml.tr
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/docs/manual/rewrite/index.xml.tr?rev=1333985&r1=1333984&r2=1333985&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/docs/manual/rewrite/index.xml.tr [utf-8] (original)
+++ httpd/httpd/branches/2.4.x/docs/manual/rewrite/index.xml.tr [utf-8] Fri May  4 14:25:32 2012
@@ -1,7 +1,7 @@
 <?xml version='1.0' encoding='UTF-8' ?>
 <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.tr.xsl"?>
-<!-- English Revision: 1328305 -->
+<!-- English Revision: 1174747:1328303 (outdated) -->
 <!-- =====================================================
  Translated by: Nilgün Belma Bugüner <nilgun belgeler.org>
    Reviewed by: Orhan Berent <berent belgeler.org>

Modified: httpd/httpd/branches/2.4.x/docs/manual/rewrite/index.xml.zh-cn
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/docs/manual/rewrite/index.xml.zh-cn?rev=1333985&r1=1333984&r2=1333985&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/docs/manual/rewrite/index.xml.zh-cn (original)
+++ httpd/httpd/branches/2.4.x/docs/manual/rewrite/index.xml.zh-cn Fri May  4 14:25:32 2012
@@ -1,7 +1,7 @@
 <?xml version='1.0' encoding='UTF-8' ?>
 <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.zh-cn.xsl"?>
-<!-- English Revision: 1028730:1328305 (outdated) -->
+<!-- English Revision: 1028730:1328303 (outdated) -->
 
 <!--
  Licensed to the Apache Software Foundation (ASF) under one or more

Modified: httpd/httpd/branches/2.4.x/docs/manual/rewrite/intro.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/docs/manual/rewrite/intro.xml?rev=1333985&r1=1333984&r2=1333985&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/docs/manual/rewrite/intro.xml (original)
+++ httpd/httpd/branches/2.4.x/docs/manual/rewrite/intro.xml Fri May  4 14:25:32 2012
@@ -173,10 +173,15 @@ of three arguments separated by spaces. 
 <li><var>[flags]</var>: options affecting the rewritten request.</li>
 </ol>
 
-<p>The <var>Pattern</var> is always a <a href="#regex">regular
-expression</a> matched against the URL-Path of the incoming request
-(the part after the hostname but before any question mark indicating
-the beginning of a query string).</p>
+<p>The <var>Pattern</var> is a <a href="#regex">regular expression</a>. 
+It is initially (for the first rewrite rule or until a substitution occurs) 
+matched against the URL-path of the incoming request (the part after the 
+hostname but before any question mark indicating the beginning of a query 
+string) or, in per-directory context, against the request's path relative 
+to the directory for which the rule is defined. Once a substitution has 
+occured, the rules that follow are matched against the substituted
+value.
+</p>
 
 <p class="figure">
       <img src="../images/syntax_rewriterule.png"
@@ -190,18 +195,18 @@ the beginning of a query string).</p>
 <dl>
 <dt>A full filesystem path to a resource</dt>
 <dd>
-<example>
+<highlight language="config">
 RewriteRule ^/games /usr/local/games/web
-</example>
+</highlight>
 <p>This maps a request to an arbitrary location on your filesystem, much
 like the <directive module="mod_alias">Alias</directive> directive.</p>
 </dd>
 
 <dt>A web-path to a resource</dt>
 <dd>
-<example>
+<highlight language="config">
 RewriteRule ^/foo$ /bar
-</example>
+</highlight>
 <p>If <directive module="core">DocumentRoot</directive> is set
 to <code>/usr/local/apache2/htdocs</code>, then this directive would
 map requests for <code>http://example.com/foo</code> to the
@@ -210,9 +215,9 @@ path <code>/usr/local/apache2/htdocs/bar
 
 <dt>An absolute URL</dt>
 <dd>
-<example>
+<highlight language="config">
 RewriteRule ^/product/view$ http://site2.example.com/seeproduct.html [R]
-</example>
+</highlight>
 <p>This tells the client to make a new request for the specified URL.</p>
 </dd>
 </dl>
@@ -220,9 +225,9 @@ RewriteRule ^/product/view$ http://site2
 <p>The <var>Substitution</var> can also
 contain <em>back-references</em> to parts of the incoming URL-path
 matched by the <var>Pattern</var>. Consider the following:</p>
-<example>
+<highlight language="config">
 RewriteRule ^/product/(.*)/view$ /var/web/productdb/$1
-</example>
+</highlight>
 <p>The variable <code>$1</code> will be replaced with whatever text
 was matched by the expression inside the parenthesis in
 the <var>Pattern</var>. For example, a request
@@ -244,9 +249,9 @@ application of one or more flags to the 
 matching behavior of a rule can be made case-insensitive by the
 application of the <code>[NC]</code> flag:
 </p>
-<example>
+<highlight language="config">
 RewriteRule ^puppy.html smalldog.html [NC]
-</example>
+</highlight>
 
 <p>For more details on the available flags, their meanings, and
 examples, see the <a href="flags.html">Rewrite Flags</a> document.</p>
@@ -272,10 +277,10 @@ argument is a list of flags that modify 
 
 <p>For example, to send all requests from a particular IP range to a
 different server, you could use:</p>
-<example>
-RewriteCond %{REMOTE_ADDR} ^10\.2\.<br />
+<highlight language="config">
+RewriteCond %{REMOTE_ADDR} ^10\.2\.
 RewriteRule (.*) http://intranet.example.com$1
-</example>
+</highlight>
 
 <p>When more than
 one <directive module="mod_rewrite">RewriteCond</directive> is
@@ -284,11 +289,11 @@ the <directive module="mod_rewrite">Rewr
 applied. For example, to deny requests that contain the word "hack" in
 their query string, unless they also contain a cookie containing
 the word "go", you could use:</p>
-<example>
-RewriteCond %{QUERY_STRING} hack<br />
-RewriteCond %{HTTP_COOKIE} !go<br />
+<highlight language="config">
+RewriteCond %{QUERY_STRING} hack
+RewriteCond %{HTTP_COOKIE} !go
 RewriteRule . - [F]
-</example>
+</highlight>
 <p>Notice that the exclamation mark specifies a negative match, so the rule is only applied if the cookie does not contain "go".</p>
 
 <p>Matches in the regular expressions contained in
@@ -298,10 +303,10 @@ the <directive module="mod_rewrite">Rewr
 variables <code>%1</code>, <code>%2</code>, etc. For example, this
 will direct the request to a different directory depending on the
 hostname used to access the site:</p>
-<example>
-RewriteCond %{HTTP_HOST} (.*)<br />
+<highlight language="config">
+RewriteCond %{HTTP_HOST} (.*)
 RewriteRule ^/(.*) /sites/%1/$1
-</example>
+</highlight>
 <p>If the request was for <code>http://example.com/foo/bar</code>,
 then <code>%1</code> would contain <code>example.com</code>
 and <code>$1</code> would contain <code>foo/bar</code>.</p>

Modified: httpd/httpd/branches/2.4.x/docs/manual/rewrite/intro.xml.fr
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/docs/manual/rewrite/intro.xml.fr?rev=1333985&r1=1333984&r2=1333985&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/docs/manual/rewrite/intro.xml.fr (original)
+++ httpd/httpd/branches/2.4.x/docs/manual/rewrite/intro.xml.fr Fri May  4 14:25:32 2012
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="ISO-8859-1" ?>
 <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.fr.xsl"?>
-<!-- English Revision : 1324703 -->
+<!-- English Revision: 1325683:1332592 (outdated) -->
 <!-- French translation : Lucien GENTIS -->
 <!-- Reviewed by : Vincent Deffontaines -->
 
@@ -178,8 +178,7 @@ arri&egrave;res dans les expressions rat
       effectu&eacute;es par les r&egrave;gles RewriteRule et
       RewriteCond. Dans les chapitres suivants, nous examinerons comment
       utiliser ces r&eacute;f&eacute;rences arri&egrave;res, donc ne vous affolez pas si
-      elles vous paraissent un peu exotiques au premier abord.
-      </p>
+      elles vous paraissent un peu exotiques au premier abord.</p>
 
 <p class="figure">
       <img src="../images/rewrite_backreferences.png"
@@ -210,7 +209,9 @@ transform&eacute;e;</li>
 <p>Le <var>Mod&egrave;le</var> est toujours une <a href="#regex">expression
 rationnelle</a> compar&eacute;e au chemin de l'URL de la requ&ecirc;te entrante (la
 partie situ&eacute;e apr&egrave;s le nom d'h&ocirc;te mais avant tout point d'interrogation
-qui indique le d&eacute;but d'une cha&icirc;ne de requ&ecirc;te).</p>
+qui indique le d&eacute;but d'une cha&icirc;ne de param&egrave;tres de
+requ&ecirc;te) ou, dans un contexte de r&eacute;pertoire, au chemin de la
+requ&ecirc;te relativement au r&eacute;pertoire pour lequel la r&egrave;gle est d&eacute;finie..</p>
 
 <p class="figure">
       <img src="../images/syntax_rewriterule.png"

Modified: httpd/httpd/branches/2.4.x/docs/manual/rewrite/proxy.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/docs/manual/rewrite/proxy.xml?rev=1333985&r1=1333984&r2=1333985&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/docs/manual/rewrite/proxy.xml (original)
+++ httpd/httpd/branches/2.4.x/docs/manual/rewrite/proxy.xml Fri May  4 14:25:32 2012
@@ -65,24 +65,24 @@ A number of recipes are provided that de
       <p>To simply map a URL to another server, we use the [P] flag, as
       follows:</p>
 
-<example>
-RewriteEngine  on<br />
-RewriteBase    /products/<br />
-RewriteRule    ^<strong>widget/</strong>(.*)$  <strong>http://product.example.com/widget/</strong>$1  [<strong>P</strong>]<br />
+<highlight language="config">
+RewriteEngine  on
+RewriteBase    /products/
+RewriteRule    ^<strong>widget/</strong>(.*)$  <strong>http://product.example.com/widget/</strong>$1  [<strong>P</strong>]
 ProxyPassReverse /products/widget/ http://product.example.com/widget/
-</example>
+</highlight>
 
    <p>In the second example, we proxy the request only if we can't find
    the resource locally. This can be very useful when you're migrating
    from one server to another, and you're not sure if all the content
    has been migrated yet.</p>
 
-<example>
-RewriteCond %{REQUEST_FILENAME}       <strong>!-f</strong><br />
-RewriteCond %{REQUEST_FILENAME}       <strong>!-d</strong><br />
-RewriteRule ^/(.*) http://<strong>old</strong>.example.com/$1 [<strong>P</strong>]<br />
+<highlight language="config">
+RewriteCond %{REQUEST_FILENAME}       <strong>!-f</strong>
+RewriteCond %{REQUEST_FILENAME}       <strong>!-d</strong>
+RewriteRule ^/(.*) http://<strong>old</strong>.example.com/$1 [<strong>P</strong>]
 ProxyPassReverse / http://old.example.com/
-</example>
+</highlight>
     </dd>
 
     <dt>Discussion:</dt>

Modified: httpd/httpd/branches/2.4.x/docs/manual/rewrite/remapping.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/docs/manual/rewrite/remapping.xml?rev=1333985&r1=1333984&r2=1333985&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/docs/manual/rewrite/remapping.xml (original)
+++ httpd/httpd/branches/2.4.x/docs/manual/rewrite/remapping.xml Fri May  4 14:25:32 2012
@@ -71,10 +71,10 @@ configuration.</note>
       <p>We rewrite the old URL to the new one internally via the
       following rule:</p>
 
-<example>
-RewriteEngine  on<br />
+<highlight language="config">
+RewriteEngine  on
 RewriteRule    ^<strong>/old</strong>\.html$  <strong>/new</strong>.html [PT]
-</example>
+</highlight>
     </dd>
   </dl>
 
@@ -102,10 +102,10 @@ RewriteRule    ^<strong>/old</strong>\.h
       <p>We force a HTTP redirect to the new URL which leads to a
       change of the browsers and thus the users view:</p>
 
-<example>
-RewriteEngine  on<br />
+<highlight language="config">
+RewriteEngine  on
 RewriteRule    ^<strong>/foo</strong>\.html$  <strong>bar</strong>.html  [<strong>R</strong>]
-</example>
+</highlight>
 </dd>
 
 <dt>Discussion</dt>
@@ -116,9 +116,7 @@ RewriteRule    ^<strong>/foo</strong>\.h
     use the Redirect directive. mod_rewrite was used in that earlier
     example in order to hide the redirect from the client:</p>
 
-    <example>
-    Redirect /foo.html /bar.html
-    </example>
+    <highlight language="config">Redirect /foo.html /bar.html</highlight>
 
     </dd>
   </dl>
@@ -145,18 +143,18 @@ RewriteRule    ^<strong>/foo</strong>\.h
       to the new server, but you might also consider using the Redirect
       or RedirectMatch directive.</p>
 
-<example><title>With mod_rewrite</title>
-RewriteEngine on<br />
+<highlight language="config">#With mod_rewrite
+RewriteEngine on
 RewriteRule   ^/docs/(.+)  http://new.example.com/docs/$1  [R,L]
-</example>
+</highlight>
 
-<example><title>With RedirectMatch</title>
+<highlight language="config">#With RedirectMatch
 RedirectMatch ^/docs/(.*) http://new.example.com/docs/$1
-</example>
+</highlight>
 
-<example><title>With Redirect</title>
+<highlight language="config">#With Redirect
 Redirect /docs/ http://new.example.com/docs/
-</example>
+</highlight>
     </dd>
   </dl>
 
@@ -186,11 +184,11 @@ Redirect /docs/ http://new.example.com/d
       internally leads to the invocation of
       <code>/~quux/foo.cgi</code>.</p>
 
-<example>
-RewriteEngine  on<br />
-RewriteBase    /~quux/<br />
+<highlight language="config">
+RewriteEngine  on
+RewriteBase    /~quux/
 RewriteRule    ^foo\.<strong>html</strong>$  foo.<strong>cgi</strong>  [H=<strong>cgi-script</strong>]
-</example>
+</highlight>
     </dd>
   </dl>
 
@@ -217,21 +215,19 @@ RewriteRule    ^foo\.<strong>html</stron
       existence of the new extension. If it exists, we take
       that name, else we rewrite the URL to its original state.</p>
 
-<example>
-#   backward compatibility ruleset for<br />
-#   rewriting document.html to document.php<br />
-#   when and only when document.php exists<br />
-&lt;Directory /var/www/htdocs&gt;<br />
-<indent>
-RewriteEngine on<br />
-RewriteBase /var/www/htdocs<br />
-<br />
-RewriteCond $1.php -f<br />
-RewriteCond $1.html !-f<br />
-RewriteRule ^(.*).html$ $1.php<br />
-</indent>
+<highlight language="config">
+#   backward compatibility ruleset for
+#   rewriting document.html to document.php
+#   when and only when document.php exists
+&lt;Directory /var/www/htdocs&gt;
+    RewriteEngine on
+    RewriteBase /var/www/htdocs
+
+    RewriteCond $1.php -f
+    RewriteCond $1.html !-f
+    RewriteRule ^(.*).html$ $1.php
 &lt;/Directory&gt;
-</example>
+</highlight>
     </dd>
 
     <dt>Discussion</dt>
@@ -279,64 +275,56 @@ but rather uses the <directive module="m
 directive placed in a virtual host for the non-canonical
 hostname(s).</p>
 
-<example>
-&lt;VirtualHost *:80&gt;<br />
-<indent>
-  ServerName undesired.example.com<br />
-  ServerAlias example.com notthis.example.com<br />
-<br />
-  Redirect / http://www.example.com/<br />
-</indent>
-&lt;/VirtualHost&gt;<br />
-<br />
-&lt;VirtualHost *:80&gt;<br />
-<indent>
-  ServerName www.example.com<br />
-</indent>
+<highlight language="config">
+&lt;VirtualHost *:80&gt;
+  ServerName undesired.example.com
+  ServerAlias example.com notthis.example.com
+
+  Redirect / http://www.example.com/
 &lt;/VirtualHost&gt;
-</example>
+
+&lt;VirtualHost *:80&gt;
+  ServerName www.example.com
+&lt;/VirtualHost&gt;
+</highlight>
 
 <p>You can alternatively accomplish this using the
 <directive module="core" type="section">If</directive>
 directive:</p>
 
-<example>
-&lt;If "%{HTTP_HOST} != 'www.example.com'"&gt;<br />
-<indent>
-Redirect / http://www.example.com/
-</indent>
+<highlight language="config">
+&lt;If "%{HTTP_HOST} != 'www.example.com'"&gt;
+	Redirect / http://www.example.com/
 &lt;/If&gt;
-</example>
+</highlight>
 
 <p>Or, for example, to redirect a portion of your site to HTTPS, you
 might do the following:</p>
 
-<example>
-&lt;If "%{SERVER_PROTOCOL} != 'HTTPS'"&gt;<br />
-<indent>
-Redirect /admin/ https://www.example.com/admin/
-</indent>
+<highlight language="config">
+&lt;If "%{SERVER_PROTOCOL} != 'HTTPS'"&gt;
+	Redirect /admin/ https://www.example.com/admin/
 &lt;/If&gt;
-</example>
+</highlight>
 
 <p>If, for whatever reason, you still want to use <code>mod_rewrite</code>
 - if, for example, you need this to work with a larger set of RewriteRules -
 you might use one of the recipes below.</p>
 
 <p>For sites running on a port other than 80:</p>
-<example>
-RewriteCond %{HTTP_HOST}   !^www\.example\.com [NC]<br />
-RewriteCond %{HTTP_HOST}   !^$<br />
-RewriteCond %{SERVER_PORT} !^80$<br />
+<highlight language="config">
+RewriteCond %{HTTP_HOST}   !^www\.example\.com [NC]
+RewriteCond %{HTTP_HOST}   !^$
+RewriteCond %{SERVER_PORT} !^80$
 RewriteRule ^/?(.*)         http://www.example.com:%{SERVER_PORT}/$1 [L,R,NE]
-</example>
+</highlight>
 
 <p>And for a site running on port 80</p>
-<example>
-RewriteCond %{HTTP_HOST}   !^www\.example\.com [NC]<br />
-RewriteCond %{HTTP_HOST}   !^$<br />
+<highlight language="config">
+RewriteCond %{HTTP_HOST}   !^www\.example\.com [NC]
+RewriteCond %{HTTP_HOST}   !^$
 RewriteRule ^/?(.*)         http://www.example.com/$1 [L,R,NE]
-</example>
+</highlight>
 
         <p>
         If you wanted to do this generically for all domain names - that
@@ -345,11 +333,11 @@ RewriteRule ^/?(.*)         http://www.e
         <strong>example.com</strong>, you could use the following
         recipe:</p>
 
-<example>
-RewriteCond %{HTTP_HOST} !^www\. [NC]<br />
-RewriteCond %{HTTP_HOST} !^$<br />
+<highlight language="config">
+RewriteCond %{HTTP_HOST} !^www\. [NC]
+RewriteCond %{HTTP_HOST} !^$
 RewriteRule ^/?(.*) http://www.%{HTTP_HOST}/$1 [L,R,NE]
-</example>
+</highlight>
 
     <p>These rulesets will work either in your main server configuration
     file, or in a <code>.htaccess</code> file placed in the <directive
@@ -380,23 +368,23 @@ RewriteRule ^/?(.*) http://www.%{HTTP_HO
       resource, and, if not finding it in either place, will attempt to
       just serve it out of the location requested.</p>
 
-<example>
-RewriteEngine on<br />
-<br />
-#   first try to find it in dir1/...<br />
-#   ...and if found stop and be happy:<br />
-RewriteCond         %{DOCUMENT_ROOT}/<strong>dir1</strong>/%{REQUEST_URI}  -f<br />
-RewriteRule  ^(.+)  %{DOCUMENT_ROOT}/<strong>dir1</strong>/$1  [L]<br />
-<br />
-#   second try to find it in dir2/...<br />
-#   ...and if found stop and be happy:<br />
-RewriteCond         %{DOCUMENT_ROOT}/<strong>dir2</strong>/%{REQUEST_URI}  -f<br />
-RewriteRule  ^(.+)  %{DOCUMENT_ROOT}/<strong>dir2</strong>/$1  [L]<br />
-<br />
-#   else go on for other Alias or ScriptAlias directives,<br />
-#   etc.<br />
+<highlight language="config">
+RewriteEngine on
+
+#   first try to find it in dir1/...
+#   ...and if found stop and be happy:
+RewriteCond         %{DOCUMENT_ROOT}/<strong>dir1</strong>/%{REQUEST_URI}  -f
+RewriteRule  ^(.+)  %{DOCUMENT_ROOT}/<strong>dir1</strong>/$1  [L]
+
+#   second try to find it in dir2/...
+#   ...and if found stop and be happy:
+RewriteCond         %{DOCUMENT_ROOT}/<strong>dir2</strong>/%{REQUEST_URI}  -f
+RewriteRule  ^(.+)  %{DOCUMENT_ROOT}/<strong>dir2</strong>/$1  [L]
+
+#   else go on for other Alias or ScriptAlias directives,
+#   etc.
 RewriteRule   ^  -  [PT]
-</example>
+</highlight>
     </dd>
   </dl>
 
@@ -424,13 +412,13 @@ RewriteRule   ^  -  [PT]
     <p>We'll use a <directive module="mod_rewrite">RewriteMap</directive>
     directive to build a list of servers that we wish to use.</p>
 
-<example>
-HostnameLookups on<br />
-RewriteEngine on<br />
-RewriteMap    multiplex         txt:/path/to/map.mirrors<br />
-RewriteCond  %{REMOTE_HOST}     ([a-z]+)$ [NC]<br />
+<highlight language="config">
+HostnameLookups on
+RewriteEngine on
+RewriteMap    multiplex         txt:/path/to/map.mirrors
+RewriteCond  %{REMOTE_HOST}     ([a-z]+)$ [NC]
 RewriteRule   ^/(.*)$  ${multiplex:<strong>%1</strong>|http://www.example.com/}$1  [R,L]
-</example>
+</highlight>
 
 <example>
 ##  map.mirrors -- Multiplexing Map<br />
@@ -484,16 +472,16 @@ com       http://www.example.com/<br />
       All other browsers receive page <code>foo.32.html</code>.
       This is done with the following ruleset:</p>
 
-<example>
-RewriteCond %{HTTP_USER_AGENT}  ^<strong>Mozilla/3</strong>.*<br />
-RewriteRule ^foo\.html$         foo.<strong>NS</strong>.html          [<strong>L</strong>]<br />
-<br />
-RewriteCond %{HTTP_USER_AGENT}  ^<strong>Lynx/</strong>         [OR]<br />
-RewriteCond %{HTTP_USER_AGENT}  ^<strong>Mozilla/[12]</strong><br />
-RewriteRule ^foo\.html$         foo.<strong>20</strong>.html          [<strong>L</strong>]<br />
-<br />
+<highlight language="config">
+RewriteCond %{HTTP_USER_AGENT}  ^<strong>Mozilla/3</strong>.*
+RewriteRule ^foo\.html$         foo.<strong>NS</strong>.html          [<strong>L</strong>]
+
+RewriteCond %{HTTP_USER_AGENT}  ^<strong>Lynx/</strong>         [OR]
+RewriteCond %{HTTP_USER_AGENT}  ^<strong>Mozilla/[12]</strong>
+RewriteRule ^foo\.html$         foo.<strong>20</strong>.html          [<strong>L</strong>]
+
 RewriteRule ^foo\.html$         foo.<strong>32</strong>.html          [<strong>L</strong>]
-</example>
+</highlight>
     </dd>
   </dl>
 
@@ -524,9 +512,7 @@ RewriteRule ^foo\.html$         foo.<str
        we replace <code>/puppies</code> and <code>/canines</code>
        by the canonical <code>/dogs</code>.</p>
 
-<example>
-RewriteRule   ^/(puppies|canines)/(.*)    /dogs/$2  [R]
-</example>
+<highlight language="config">RewriteRule   ^/(puppies|canines)/(.*)    /dogs/$2  [R]</highlight>
         </dd>
 
      <dt>Discussion:</dt>
@@ -534,9 +520,7 @@ RewriteRule   ^/(puppies|canines)/(.*)  
      This should really be accomplished with Redirect or RedirectMatch
      directives:
 
-     <example>
-     RedirectMatch ^/(puppies|canines)/(.*) /dogs/$2
-     </example>
+     <highlight language="config"> RedirectMatch ^/(puppies|canines)/(.*) /dogs/$2 </highlight>
      </dd>
       </dl>
 
@@ -565,17 +549,15 @@ using the following ruleset:</p>
       <code>/about/</code>:
       </p>
 
-<example>
-RewriteEngine on<br />
+<highlight language="config">
+RewriteEngine on
 RewriteRule   <strong>^/$</strong>  /about/  [<strong>R</strong>]
-</example>
+</highlight>
 
 <p>Note that this can also be handled using the <directive
 module="mod_alias">RedirectMatch</directive> directive:</p>
 
-<example>
-RedirectMatch ^/$ http://example.com/about/
-</example>
+<highlight language="config">RedirectMatch ^/$ http://example.com/about/</highlight>
 
 <p>Note also that the example rewrites only the root URL. That is, it
 rewrites a request for <code>http://example.com/</code>, but not a
@@ -604,36 +586,30 @@ that should go to an existing resource s
 <p>As of version 2.2.16, you should use the <directive
 module="mod_dir">FallbackResource</directive> directive for this:</p>
 
-<example>
-&lt;Directory /var/www/my_blog&gt;<br />
-<indent>
-  FallbackResource index.php<br />
-</indent>
+<highlight language="config">
+&lt;Directory /var/www/my_blog&gt;
+  FallbackResource index.php
 &lt;/Directory&gt;
-</example>
+</highlight>
 
 <p>However, in earlier versions of Apache, or if your needs are more
 complicated than this, you can use a variation of the following rewrite
 set to accomplish the same thing:</p>
 
-<example>
-&lt;Directory /var/www/my_blog&gt;<br />
-<indent>
-  RewriteBase /my_blog<br />
-<br />
-  RewriteCond /var/www/my_blog/%{REQUEST_FILENAME} !-f<br />
-  RewriteCond /var/www/my_blog/%{REQUEST_FILENAME} !-d<br />
-  RewriteRule ^ index.php [PT]<br />
-</indent>
+<highlight language="config">
+&lt;Directory /var/www/my_blog&gt;
+  RewriteBase /my_blog
+
+  RewriteCond /var/www/my_blog/%{REQUEST_FILENAME} !-f
+  RewriteCond /var/www/my_blog/%{REQUEST_FILENAME} !-d
+  RewriteRule ^ index.php [PT]
 &lt;/Directory&gt;
-</example>
+</highlight>
 
 <p>If, on the other hand, you wish to pass the requested URI as a query
 string argument to index.php, you can replace that RewriteRule with:</p>
 
-<example>
-  RewriteRule (.*) index.php?$1 [PT,QSA]
-</example>
+<highlight language="config">RewriteRule (.*) index.php?$1 [PT,QSA]</highlight>
 
 <p>Note that these rulesets can be used in a <code>.htaccess</code>
 file, as well as in a &lt;Directory&gt; block.</p>

Modified: httpd/httpd/branches/2.4.x/docs/manual/rewrite/rewritemap.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/docs/manual/rewrite/rewritemap.xml?rev=1333985&r1=1333984&r2=1333985&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/docs/manual/rewrite/rewritemap.xml (original)
+++ httpd/httpd/branches/2.4.x/docs/manual/rewrite/rewritemap.xml Fri May  4 14:25:32 2012
@@ -60,9 +60,7 @@ configuration.</note>
    <p>The syntax of the <code>RewriteMap</code> directive is as
    follows:</p>
 
-<example>
-RewriteMap <em>MapName</em> <em>MapType</em>:<em>MapSource</em>
-</example>
+<highlight language="config">RewriteMap <em>MapName</em> <em>MapType</em>:<em>MapSource</em></highlight>
 
     <p>The <a id="mapfunc" name="mapfunc"><em>MapName</em></a> is an
     arbitray name that you assign to the map, and which you will use in
@@ -86,21 +84,15 @@ RewriteMap <em>MapName</em> <em>MapType<
 
     <p>For example, you might define a
       <directive>RewriteMap</directive> as:</p>
-    <example>
-      RewriteMap examplemap txt:/path/to/file/map.txt
-      </example>
+    <highlight language="config">RewriteMap examplemap txt:/path/to/file/map.txt</highlight>
     <p>You would then be able to use this map in a
       <directive>RewriteRule</directive> as follows:</p>
-<example>
-  RewriteRule ^/ex/(.*) ${examplemap:$1}
-</example>
+<highlight language="config">RewriteRule ^/ex/(.*) ${examplemap:$1}</highlight>
 
 <p>A default value can be specified in the event that nothing is found
 in the map:</p>
 
-<example>
-RewriteRule ^/ex/(.*) ${examplemap:$1|/not_found.html}
-</example>
+<highlight language="config">RewriteRule ^/ex/(.*) ${examplemap:$1|/not_found.html}</highlight>
 
 <note><title>Per-directory and .htaccess context</title>
 <p>
@@ -141,11 +133,11 @@ may be used, and give examples of each.<
     <p>For example, we might use a mapfile to translate product names to
     product IDs for easier-to-remember URLs, using the following
     recipe:</p>
-
-    <example><title>Product to ID configuration</title>
-    RewriteMap product2id txt:/etc/apache2/productmap.txt<br />
-    RewriteRule ^/product/(.*) /prods.php?id=${product2id:$1|NOTFOUND} [PT]
-    </example>
+<p><strong>Product to ID configuration</strong></p>
+    <highlight language="config">
+RewriteMap product2id txt:/etc/apache2/productmap.txt
+RewriteRule ^/product/(.*) /prods.php?id=${product2id:$1|NOTFOUND} [PT]
+    </highlight>
 
     <p>We assume here that the <code>prods.php</code> script knows what
     to do when it received an argument of <code>id=NOTFOUND</code> when
@@ -175,9 +167,7 @@ telephone  328
     scope. If you're planning to use this in a <code>.htaccess</code>
     file, you'll need to remove the leading slash from the rewrite
     pattern in order for it to match anything:
-    <example>
-    RewriteRule ^product/(.*) /prods.php?id=${product2id:$1|NOTFOUND} [PT]
-    </example>
+    <highlight language="config">RewriteRule ^product/(.*) /prods.php?id=${product2id:$1|NOTFOUND} [PT]</highlight>
     </note>
 
     <note><title>Cached lookups</title>
@@ -213,13 +203,13 @@ telephone  328
 static   www1|www2|www3|www4<br />
 dynamic  www5|www6
     </example>
-
-    <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>
+<p><strong>Configuration directives</strong></p>
+    <highlight language="config">
+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]
+    </highlight>
 
     <p>So, when an image is requested and the first of these rules is
     matched, <code>RewriteMap</code> looks up the string
@@ -250,9 +240,9 @@ static   www1|www1|www2|www3|www4
 
     <p>You may optionally specify a particular dbm type:</p>
 
- <example>
- RewriteMap examplemap dbm=sdbm:/etc/apache/mapfile.dbm
- </example>
+ <highlight language="config">
+RewriteMap examplemap dbm=sdbm:/etc/apache/mapfile.dbm
+ </highlight>
 
     <p>The type can be sdbm, gdbm, ndbm or db.
     However, it is recommended that you just use the <a
@@ -271,9 +261,9 @@ $ httxt2dbm -i mapfile.txt -o mapfile.ma
 <p>You can then reference the resulting file in your
 <code>RewriteMap</code> directive:</p>
 
-<example>
+<highlight language="config">
 RewriteMap mapname dbm:/etc/apache/mapfile.map
-</example>
+</highlight>
 
 <note>
 <p>Note that with some dbm types, more than one file is generated, with
@@ -322,10 +312,12 @@ by many requests.
     the int function, and then use that in your <code>RewriteRule</code>:
     </p>
 
-    <example><title>Redirect a URI to an all-lowercase version of itself</title>
-    RewriteMap lc int:tolower<br />
-    RewriteRule (.*?[A-Z]+.*) ${lc:$1} [R]
-    </example>
+   <p> <strong>Redirect a URI to an all-lowercase version of itself</strong></p>
+    <highlight language="config">
+
+RewriteMap lc int:tolower
+RewriteRule (.*?[A-Z]+.*) ${lc:$1} [R]
+    </highlight>
 
     <note>
     <p>Please note that the example offered here is for
@@ -365,22 +357,23 @@ by many requests.
 
     <p>A simple example is shown here which will replace all dashes with
     underscores in a request URI.</p>
-
-    <example><title>Rewrite configuration</title>
-    RewriteMap d2u prg:/www/bin/dash2under.pl<br />
-    RewriteRule - ${d2u:%{REQUEST_URI}}
-    </example>
-
-    <example><title>dash2under.pl</title>
-    #!/usr/bin/perl<br />
-    $| = 1; # Turn off I/O buffering<br />
-    while (&lt;STDIN&gt;) {<br />
-        <indent>
-        s/-/_/g; # Replace dashes with underscores<br />
-        print $_;<br />
-        </indent>
-    }<br />
-    </example>
+    
+<p><strong>Rewrite configuration</strong></p>
+    <highlight language="config">
+
+RewriteMap d2u prg:/www/bin/dash2under.pl<br />
+RewriteRule - ${d2u:%{REQUEST_URI}}
+    </highlight>
+
+    <p><strong>dash2under.pl</strong></p>
+    <highlight language="perl">
+    #!/usr/bin/perl
+    $| = 1; # Turn off I/O buffering
+    while (&lt;STDIN&gt;) {
+        s/-/_/g; # Replace dashes with underscores
+        print $_;
+    }
+    </highlight>
 
 <note><title>Caution!</title>
 <ul>
@@ -423,9 +416,9 @@ this process, or if the script itself is
     <p>If a query returns more than one row, a random row from
 the result set is used.</p>
 
-    <example><title>Example</title>
+    <highlight language="config"><strong>Example</strong>
 RewriteMap myquery "fastdbd:SELECT destination FROM rewrite WHERE source = %s"
-    </example>
+    </highlight>
 
   </section>
   <section id="summary">

Modified: httpd/httpd/branches/2.4.x/docs/manual/rewrite/tech.xml.fr
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/docs/manual/rewrite/tech.xml.fr?rev=1333985&r1=1333984&r2=1333985&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/docs/manual/rewrite/tech.xml.fr (original)
+++ httpd/httpd/branches/2.4.x/docs/manual/rewrite/tech.xml.fr Fri May  4 14:25:32 2012
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="ISO-8859-1" ?>
 <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.fr.xsl"?>
-<!-- English Revision : 1328310 -->
+<!-- English Revision : 1325527 -->
 <!-- French translation : Lucien GENTIS -->
 <!-- Reviewed by : Vincent Deffontaines -->
 

Modified: httpd/httpd/branches/2.4.x/docs/manual/rewrite/vhosts.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/docs/manual/rewrite/vhosts.xml?rev=1333985&r1=1333984&r2=1333985&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/docs/manual/rewrite/vhosts.xml (original)
+++ httpd/httpd/branches/2.4.x/docs/manual/rewrite/vhosts.xml Fri May  4 14:25:32 2012
@@ -71,14 +71,14 @@ mod_rewrite</a> document.</note>
 
     <dd>
 
-<example>
-RewriteEngine on<br />
-<br />
-RewriteMap    lowercase int:tolower<br />
-<br />
-RewriteCond   %{lowercase:%{<strong>HTTP_HOST</strong>}}   ^www\.<strong>([^.]+)</strong>\.example\.com$<br />
+<highlight language="config">
+RewriteEngine on
+
+RewriteMap    lowercase int:tolower
+
+RewriteCond   %{lowercase:%{<strong>HTTP_HOST</strong>}}   ^www\.<strong>([^.]+)</strong>\.example\.com$
 RewriteRule   ^(.*) /home/<strong>%1</strong>/www$1
-</example></dd>
+</highlight></dd>
 
 <dt>Discussion</dt>
     <dd>
@@ -129,39 +129,37 @@ dynamic content, and Alias resolution.
     any <code>ScriptAlias</code> directives, we must have
     <code>mod_rewrite</code> explicitly enact those mappings.</p>
 
-<example>
-# get the server name from the Host: header<br />
-UseCanonicalName Off<br />
-<br />
-# splittable logs<br />
-LogFormat "%{Host}i %h %l %u %t \"%r\" %s %b" vcommon<br />
-CustomLog logs/access_log vcommon<br />
-<br />
-&lt;Directory /www/hosts&gt;<br />
-<indent>
-    # ExecCGI is needed here because we can't force<br />
-    # CGI execution in the way that ScriptAlias does<br />
-    Options FollowSymLinks ExecCGI<br />
-</indent>
-&lt;/Directory&gt;<br />
-<br />
-RewriteEngine On<br />
-<br />
-# a ServerName derived from a Host: header may be any case at all<br />
-RewriteMap  lowercase  int:tolower<br />
-<br />
-## deal with normal documents first:<br />
-# allow Alias /icons/ to work - repeat for other aliases<br />
-RewriteCond  %{REQUEST_URI}  !^/icons/<br />
-# allow CGIs to work<br />
-RewriteCond  %{REQUEST_URI}  !^/cgi-bin/<br />
-# do the magic<br />
-RewriteRule  ^/(.*)$  /www/hosts/${lowercase:%{SERVER_NAME}}/docs/$1<br />
-<br />
-## and now deal with CGIs - we have to force a handler<br />
-RewriteCond  %{REQUEST_URI}  ^/cgi-bin/<br />
-RewriteRule  ^/(.*)$  /www/hosts/${lowercase:%{SERVER_NAME}}/cgi-bin/$1  [H=cgi-script]<br />
-</example>
+<highlight language="config">
+# get the server name from the Host: header
+UseCanonicalName Off
+
+# splittable logs
+LogFormat "%{Host}i %h %l %u %t \"%r\" %s %b" vcommon
+CustomLog logs/access_log vcommon
+
+&lt;Directory /www/hosts&gt;
+    # ExecCGI is needed here because we can't force
+    # CGI execution in the way that ScriptAlias does
+    Options FollowSymLinks ExecCGI
+&lt;/Directory&gt;
+
+RewriteEngine On
+
+# a ServerName derived from a Host: header may be any case at all
+RewriteMap  lowercase  int:tolower
+
+## deal with normal documents first:
+# allow Alias /icons/ to work - repeat for other aliases
+RewriteCond  %{REQUEST_URI}  !^/icons/
+# allow CGIs to work
+RewriteCond  %{REQUEST_URI}  !^/cgi-bin/
+# do the magic
+RewriteRule  ^/(.*)$  /www/hosts/${lowercase:%{SERVER_NAME}}/docs/$1
+
+## and now deal with CGIs - we have to force a handler
+RewriteCond  %{REQUEST_URI}  ^/cgi-bin/
+RewriteRule  ^/(.*)$  /www/hosts/${lowercase:%{SERVER_NAME}}/cgi-bin/$1  [H=cgi-script]
+</highlight>
 
 </section>
 
@@ -184,27 +182,27 @@ customer-N.example.com  /www/customers/N
 
     <p>The <code>httpd.conf</code> should contain the following:</p>
 
-<example>
-RewriteEngine on<br />
-<br />
-RewriteMap   lowercase  int:tolower<br />
-<br />
-# define the map file<br />
-RewriteMap   vhost      txt:/www/conf/vhost.map<br />
-<br />
-# deal with aliases as above<br />
-RewriteCond  %{REQUEST_URI}               !^/icons/<br />
-RewriteCond  %{REQUEST_URI}               !^/cgi-bin/<br />
-RewriteCond  ${lowercase:%{SERVER_NAME}}  ^(.+)$<br />
-# this does the file-based remap<br />
-RewriteCond  ${vhost:%1}                  ^(/.*)$<br />
-RewriteRule  ^/(.*)$                      %1/docs/$1<br />
-<br />
-RewriteCond  %{REQUEST_URI}               ^/cgi-bin/<br />
-RewriteCond  ${lowercase:%{SERVER_NAME}}  ^(.+)$<br />
-RewriteCond  ${vhost:%1}                  ^(/.*)$<br />
+<highlight language="config">
+RewriteEngine on
+
+RewriteMap   lowercase  int:tolower
+
+# define the map file
+RewriteMap   vhost      txt:/www/conf/vhost.map
+
+# deal with aliases as above
+RewriteCond  %{REQUEST_URI}               !^/icons/
+RewriteCond  %{REQUEST_URI}               !^/cgi-bin/
+RewriteCond  ${lowercase:%{SERVER_NAME}}  ^(.+)$
+# this does the file-based remap
+RewriteCond  ${vhost:%1}                  ^(/.*)$
+RewriteRule  ^/(.*)$                      %1/docs/$1
+
+RewriteCond  %{REQUEST_URI}               ^/cgi-bin/
+RewriteCond  ${lowercase:%{SERVER_NAME}}  ^(.+)$
+RewriteCond  ${vhost:%1}                  ^(/.*)$
 RewriteRule  ^/(.*)$                      %1/cgi-bin/$1 [H=cgi-script]
-</example>
+</highlight>
 
 </section>
 



Mime
View raw message