httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rbo...@apache.org
Subject svn commit: r880707 - in /httpd/httpd/trunk/docs/manual/rewrite: access.html.en access.xml rewrite_guide.html.en rewrite_guide.xml
Date Mon, 16 Nov 2009 11:17:54 GMT
Author: rbowen
Date: Mon Nov 16 11:17:54 2009
New Revision: 880707

URL: http://svn.apache.org/viewvc?rev=880707&view=rev
Log:

Not sure this is actually a useful recipe, but it belongs in the access
file.

Modified:
    httpd/httpd/trunk/docs/manual/rewrite/access.html.en
    httpd/httpd/trunk/docs/manual/rewrite/access.xml
    httpd/httpd/trunk/docs/manual/rewrite/rewrite_guide.html.en
    httpd/httpd/trunk/docs/manual/rewrite/rewrite_guide.xml

Modified: httpd/httpd/trunk/docs/manual/rewrite/access.html.en
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/rewrite/access.html.en?rev=880707&r1=880706&r2=880707&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/rewrite/access.html.en (original)
+++ httpd/httpd/trunk/docs/manual/rewrite/access.html.en Mon Nov 16 11:17:54 2009
@@ -38,6 +38,7 @@
 <div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif"
/> <a href="#blocked-inline-images">Forbidding Image "Hotlinking"</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#blocking-of-robots">Blocking
of Robots</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#host-deny">Denying
Hosts in a Blacklist</a></li>
+<li><img alt="" src="../images/down.gif" /> <a href="#referer-deflector">Referer-based
Deflector</a></li>
 </ul><h3>See also</h3><ul class="seealso"><li><a href="../mod/mod_rewrite.html">Module
documentation</a></li><li><a href="intro.html">mod_rewrite introduction</a></li><li><a
href="remapping.html">Redirection and remapping</a></li><li><a href="advanced.html">Advanced
techniques and tricks</a></li><li><a href="avoid.html">When not to
use mod_rewrite</a></li></ul></div>
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif"
/></a></div>
 <div class="section">
@@ -244,6 +245,55 @@
     </dd>
   </dl>
 
+</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif"
/></a></div>
+<div class="section">
+<h2><a name="referer-deflector" id="referer-deflector">Referer-based Deflector</a></h2>
+
+  
+
+  <dl>
+    <dt>Description:</dt>
+
+    <dd>
+      <p>Redirect requests based on the Referer from which the request
+      came, with different targets per Referer.</p>
+    </dd>
+
+    <dt>Solution:</dt>
+
+    <dd>
+  <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
+RewriteRule ^.* ${deflector:%{HTTP_REFERER}} [R,L]
+</pre></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://www.badguys.com/bad/index.html    -
+http://www.badguys.com/bad/index2.html   -
+http://www.badguys.com/bad/index3.html   http://somewhere.com/
+</pre></div>
+
+    </dd>
+  </dl>
+
 </div></div>
 <div class="bottomlang">
 <p><span>Available Languages: </span><a href="../en/rewrite/access.html"
title="English">&nbsp;en&nbsp;</a></p>

Modified: httpd/httpd/trunk/docs/manual/rewrite/access.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/rewrite/access.xml?rev=880707&r1=880706&r2=880707&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/rewrite/access.xml (original)
+++ httpd/httpd/trunk/docs/manual/rewrite/access.xml Mon Nov 16 11:17:54 2009
@@ -252,4 +252,53 @@
 
 </section>
 
+<section id="referer-deflector">
+
+  <title>Referer-based Deflector</title>
+
+  <dl>
+    <dt>Description:</dt>
+
+    <dd>
+      <p>Redirect requests based on the Referer from which the request
+      came, with different targets per Referer.</p>
+    </dd>
+
+    <dt>Solution:</dt>
+
+    <dd>
+  <p>The following ruleset uses a map file to associate each Referer
+  with a redirection target.</p>
+
+<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
+RewriteRule ^.* ${deflector:%{HTTP_REFERER}} [R,L]
+</pre></example>
+
+      <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>
+
+<example><pre>
+##
+##  deflector.map
+##
+
+http://www.badguys.com/bad/index.html    -
+http://www.badguys.com/bad/index2.html   -
+http://www.badguys.com/bad/index3.html   http://somewhere.com/
+</pre></example>
+
+    </dd>
+  </dl>
+
+</section>
+
 </manualpage> 

Modified: httpd/httpd/trunk/docs/manual/rewrite/rewrite_guide.html.en
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/rewrite/rewrite_guide.html.en?rev=880707&r1=880706&r2=880707&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/rewrite/rewrite_guide.html.en (original)
+++ httpd/httpd/trunk/docs/manual/rewrite/rewrite_guide.html.en Mon Nov 16 11:17:54 2009
@@ -52,7 +52,6 @@
 <li><img alt="" src="../images/down.gif" /> <a href="#retrieve-missing-data">Retrieve
Missing Data from Intranet</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#new-mime-type">New
MIME-type, New Service</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#mass-virtual-hosting">Mass
Virtual Hosting</a></li>
-<li><img alt="" src="../images/down.gif" /> <a href="#referer-deflector">Referer-based
Deflector</a></li>
 </ul><h3>See also</h3><ul class="seealso"><li><a href="../mod/mod_rewrite.html">Module
 documentation</a></li><li><a href="intro.html">mod_rewrite
 introduction</a></li><li><a href="rewrite_guide_advanced.html">Advanced
Rewrite Guide - advanced 
@@ -591,58 +590,6 @@
         </dd>
       </dl>
 
-    </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif"
/></a></div>
-<div class="section">
-<h2><a name="referer-deflector" id="referer-deflector">Referer-based Deflector</a></h2>
-
-      
-
-      <dl>
-        <dt>Description:</dt>
-
-        <dd>
-          <p>How can we program a flexible URL Deflector which acts
-          on the "Referer" HTTP header and can be configured with as
-          many referring pages as we like?</p>
-        </dd>
-
-        <dt>Solution:</dt>
-
-        <dd>
-          <p>Use the following really tricky ruleset...</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
-RewriteRule ^.* ${deflector:%{HTTP_REFERER}} [R,L]
-</pre></div>
-
-          <p>... in conjunction with a corresponding rewrite
-          map:</p>
-
-<div class="example"><pre>
-##
-##  deflector.map
-##
-
-http://www.badguys.com/bad/index.html    -
-http://www.badguys.com/bad/index2.html   -
-http://www.badguys.com/bad/index3.html   http://somewhere.com/
-</pre></div>
-
-          <p>This automatically redirects the request back to the
-          referring page (when "<code>-</code>" is used as the value
-          in the map) or to a specific URL (when an URL is specified
-          in the map as the second argument).</p>
-        </dd>
-      </dl>
-
     </div></div>
 <div class="bottomlang">
 <p><span>Available Languages: </span><a href="../en/rewrite/rewrite_guide.html"
title="English">&nbsp;en&nbsp;</a> |

Modified: httpd/httpd/trunk/docs/manual/rewrite/rewrite_guide.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/rewrite/rewrite_guide.xml?rev=880707&r1=880706&r2=880707&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/rewrite/rewrite_guide.xml (original)
+++ httpd/httpd/trunk/docs/manual/rewrite/rewrite_guide.xml Mon Nov 16 11:17:54 2009
@@ -591,58 +591,6 @@
 
     </section>
 
-    <section id="referer-deflector">
-
-      <title>Referer-based Deflector</title>
-
-      <dl>
-        <dt>Description:</dt>
-
-        <dd>
-          <p>How can we program a flexible URL Deflector which acts
-          on the "Referer" HTTP header and can be configured with as
-          many referring pages as we like?</p>
-        </dd>
-
-        <dt>Solution:</dt>
-
-        <dd>
-          <p>Use the following really tricky ruleset...</p>
-
-<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
-RewriteRule ^.* ${deflector:%{HTTP_REFERER}} [R,L]
-</pre></example>
-
-          <p>... in conjunction with a corresponding rewrite
-          map:</p>
-
-<example><pre>
-##
-##  deflector.map
-##
-
-http://www.badguys.com/bad/index.html    -
-http://www.badguys.com/bad/index2.html   -
-http://www.badguys.com/bad/index3.html   http://somewhere.com/
-</pre></example>
-
-          <p>This automatically redirects the request back to the
-          referring page (when "<code>-</code>" is used as the value
-          in the map) or to a specific URL (when an URL is specified
-          in the map as the second argument).</p>
-        </dd>
-      </dl>
-
-    </section>
-
 
 </manualpage>
 



Mime
View raw message