]> granicus.if.org Git - apache/commitdiff
Rebuild HTML
authorRich Bowen <rbowen@apache.org>
Fri, 14 Jan 2011 21:04:03 +0000 (21:04 +0000)
committerRich Bowen <rbowen@apache.org>
Fri, 14 Jan 2011 21:04:03 +0000 (21:04 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1059166 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/rewrite/access.html.en
docs/manual/rewrite/vhosts.html.en

index 9c7433d272941b5e151ad36ed25c50a36ec129db..ab561386f9245a9d8c3d23a2e62c357aaddcd4de 100644 (file)
@@ -73,29 +73,29 @@ configuration.</div>
     initiate from a page on our site. For the purpose of this example,
     we assume that our site is <code>www.example.com</code>.</p>
 
-<div class="example"><pre>
-RewriteCond %{HTTP_REFERER} <strong>!^$</strong>
-RewriteCond %{HTTP_REFERER} !www.example.com [NC]
+<div class="example"><p><code>
+RewriteCond %{HTTP_REFERER} <strong>!^$</strong><br />
+RewriteCond %{HTTP_REFERER} !www.example.com [NC]<br />
 RewriteRule <strong>\.(gif|jpg|png)$</strong>    -   [F,NC]
-</pre></div>
+</code></p></div>
 
     <p>In this second example, instead of failing the request, we display
     an alternate image instead.</p>
 
-<div class="example"><pre>
-RewriteCond %{HTTP_REFERER} <strong>!^$</strong>
-RewriteCond %{HTTP_REFERER} !www.example.com [NC]
+<div class="example"><p><code>
+RewriteCond %{HTTP_REFERER} <strong>!^$</strong><br />
+RewriteCond %{HTTP_REFERER} !www.example.com [NC]<br />
 RewriteRule <strong>\.(gif|jpg|png)$</strong>    /images/go-away.png   [R,NC]
-</pre></div>
+</code></p></div>
 
     <p>In the third example, we redirect the request to an image on some
     other site.</p>
 
-<div class="example"><pre>
-RewriteCond %{HTTP_REFERER} <strong>!^$</strong>
-RewriteCond %{HTTP_REFERER} !www.example.com [NC]
+<div class="example"><p><code>
+RewriteCond %{HTTP_REFERER} <strong>!^$</strong><br />
+RewriteCond %{HTTP_REFERER} !www.example.com [NC]<br />
 RewriteRule <strong>\.(gif|jpg|png)$</strong> http://other.example.com/image.gif   [R,NC]
-</pre></div>
+</code></p></div>
 
     <p>Of these techniques, the last two tend to be the most effective
     in getting people to stop hotlinking your images, because they will
@@ -160,11 +160,11 @@ RewriteRule <strong>\.(gif|jpg|png)$</strong> http://other.example.com/image.gif
         range, if you are trying to block that user agent only from the
         particular source.</p>
 
-<div class="example"><pre>
-RewriteCond %{HTTP_USER_AGENT}   ^<strong>NameOfBadRobot</strong>
-RewriteCond %{REMOTE_ADDR}       =<strong>123\.45\.67\.[8-9]</strong>
+<div class="example"><p><code>
+RewriteCond %{HTTP_USER_AGENT}   ^<strong>NameOfBadRobot</strong><br />
+RewriteCond %{REMOTE_ADDR}       =<strong>123\.45\.67\.[8-9]</strong><br />
 RewriteRule ^<strong>/secret/files/</strong>   -   [<strong>F</strong>]
-</pre></div>
+</code></p></div>
         </dd>
 
       <dt>Discussion:</dt>
@@ -211,27 +211,27 @@ RewriteRule ^<strong>/secret/files/</strong>   -   [<strong>F</strong>]
     <dt>Solution:</dt>
 
     <dd>
-<div class="example"><pre>
-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
+<div class="example"><p><code>
+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 />
 RewriteRule   ^  -  [F]
-</pre></div>
-
-<div class="example"><pre>
-##
-##  hosts.deny
-##
-##  ATTENTION! This is a map, not a list, even when we treat it as such.
-##             mod_rewrite parses it for key/value pairs, so at least a
-##             dummy value "-" must be present for each entry.
-##
-
-193.102.180.41 -
-bsdti1.sdm.de  -
-192.76.162.40  -
-</pre></div>
+</code></p></div>
+
+<div class="example"><p><code>
+##<br />
+##  hosts.deny<br />
+##<br />
+##  ATTENTION! This is a map, not a list, even when we treat it as such.<br />
+##             mod_rewrite parses it for key/value pairs, so at least a<br />
+##             dummy value "-" must be present for each entry.<br />
+##<br />
+<br />
+193.102.180.41 -<br />
+bsdti1.sdm.de  -<br />
+192.76.162.40  -<br />
+</code></p></div>
     </dd>
 
     <dt>Discussion:</dt>
@@ -265,31 +265,31 @@ bsdti1.sdm.de  -
   <p>The following ruleset uses a map file to associate each Referer
   with a redirection target.</p>
 
-<div class="example"><pre>
-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
+<div class="example"><p><code>
+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 />
 RewriteRule ^.* ${deflector:%{HTTP_REFERER}} [R,L]
-</pre></div>
+</code></p></div>
 
       <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
       placed in the map:</p>
 
-<div class="example"><pre>
-##
-##  deflector.map
-##
-
-http://badguys.example.com/bad/index.html    -
-http://badguys.example.com/bad/index2.html   -
+<div class="example"><p><code>
+##<br />
+##  deflector.map<br />
+##<br />
+<br />
+http://badguys.example.com/bad/index.html    -<br />
+http://badguys.example.com/bad/index2.html   -<br />
 http://badguys.example.com/bad/index3.html   http://somewhere.example.com/
-</pre></div>
+</code></p></div>
 
     </dd>
   </dl>
index 24f0a8cc58280eb4040ac4f00ab17be1b084e7a9..4cfa70b3c2ab863cc8b3db19a0ce57317992c67f 100644 (file)
@@ -62,14 +62,14 @@ mod_rewrite</a> document.</div>
 
     <dd>
 
-<div class="example"><pre>
-RewriteEngine on
-
-RewriteMap    lowercase int:tolower
-
-RewriteCond   %{lowercase:%{<strong>HTTP_HOST</strong>}}   ^www\.<strong>([^.]+)</strong>\.example\.com$
+<div class="example"><p><code>
+RewriteEngine on<br />
+<br />
+RewriteMap    lowercase int:tolower<br />
+<br />
+RewriteCond   %{lowercase:%{<strong>HTTP_HOST</strong>}}   ^www\.<strong>([^.]+)</strong>\.example\.com$<br />
 RewriteRule   ^(.*) /home/<strong>%1</strong>/www$1
-</pre></div></dd>
+</code></p></div></dd>
 
 <dt>Discussion</dt>
     <dd>