]> granicus.if.org Git - apache/commitdiff
Moves the 'browser-specific' rule into remapping.
authorRich Bowen <rbowen@apache.org>
Thu, 5 Nov 2009 01:55:43 +0000 (01:55 +0000)
committerRich Bowen <rbowen@apache.org>
Thu, 5 Nov 2009 01:55:43 +0000 (01:55 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@832973 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/rewrite/index.xml.tr
docs/manual/rewrite/remapping.html.en
docs/manual/rewrite/remapping.xml
docs/manual/rewrite/rewrite_guide.html.en
docs/manual/rewrite/rewrite_guide.xml

index 7f98f22971594243c4b3a0506b73adb5f0c3932f..0f9c808a375fb367a7acc0a12ab387fa9b7554e6 100644 (file)
@@ -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: 636374:832217 (outdated) -->
+<!-- English Revision: 636374:832962 (outdated) -->
 <!-- =====================================================
  Translated by: Nilgün Belma Bugüner <nilgun belgeler.org>
    Reviewed by: Orhan Berent <berent belgeler.org>
index 598c4583c64b9c705bc9c3eeb2528c122246ef82..df8eb72e94baa8343f456bbe1aff2cbe75da22e8 100644 (file)
@@ -42,6 +42,7 @@ configuration.</div>
 <li><img alt="" src="../images/down.gif" /> <a href="#canonicalhost">Canonical Hostnames</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#multipledirs">Search for pages in more than one directory</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#archive-access-multiplexer">Redirecting to Geographically Distributed Servers</a></li>
+<li><img alt="" src="../images/down.gif" /> <a href="#browser-dependent-content">Browser Dependent Content</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></ul></div>
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
 <div class="section">
@@ -396,6 +397,46 @@ com       http://www.example.com/
     </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="browser-dependent-content" id="browser-dependent-content">Browser Dependent Content</a></h2>
+
+  
+
+  <dl>
+    <dt>Description:</dt>
+
+    <dd>
+      <p>We wish to provide different content based on the browser, or
+      user-agent, which is requesting the content.</p>
+    </dd>
+
+    <dt>Solution:</dt>
+
+    <dd>
+      <p>We have to decide, based on the HTTP header "User-Agent",
+      which content to serve. The following config
+      does the following: If the HTTP header "User-Agent"
+      contains "Mozilla/3", the page <code>foo.html</code>
+      is rewritten to <code>foo.NS.html</code> and the
+      rewriting stops. If the browser is "Lynx" or "Mozilla" of
+      version 1 or 2, the URL becomes <code>foo.20.html</code>.
+      All other browsers receive page <code>foo.32.html</code>.
+      This is done with the following ruleset:</p>
+
+<div class="example"><pre>
+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>]
+</pre></div>
+    </dd>
+  </dl>
+
 </div></div>
 <div class="bottomlang">
 <p><span>Available Languages: </span><a href="../en/rewrite/remapping.html" title="English">&nbsp;en&nbsp;</a></p>
index b71cad19493b17e92c2c333dd71c13febacb2688..a35ca38ee9f8a64983922ee61c7c053bb06e92c9 100644 (file)
@@ -400,5 +400,44 @@ com       http://www.example.com/
 
 </section>
 
+<section id="browser-dependent-content">
+
+  <title>Browser Dependent Content</title>
+
+  <dl>
+    <dt>Description:</dt>
+
+    <dd>
+      <p>We wish to provide different content based on the browser, or
+      user-agent, which is requesting the content.</p>
+    </dd>
+
+    <dt>Solution:</dt>
+
+    <dd>
+      <p>We have to decide, based on the HTTP header "User-Agent",
+      which content to serve. The following config
+      does the following: If the HTTP header "User-Agent"
+      contains "Mozilla/3", the page <code>foo.html</code>
+      is rewritten to <code>foo.NS.html</code> and the
+      rewriting stops. If the browser is "Lynx" or "Mozilla" of
+      version 1 or 2, the URL becomes <code>foo.20.html</code>.
+      All other browsers receive page <code>foo.32.html</code>.
+      This is done with the following ruleset:</p>
+
+<example><pre>
+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>]
+</pre></example>
+    </dd>
+  </dl>
+
+</section>
 
 </manualpage> 
index fabc450ea70dfb689387e0d092b568f9fbc9341e..ca042be26d7ea8978f79288aed964fa632680658 100644 (file)
@@ -50,9 +50,7 @@
 <li><img alt="" src="../images/down.gif" /> <a href="#redirectanchors">Redirecting Anchors</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#time-dependent">Time-Dependent Rewriting</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#external-rewriting">External Rewriting Engine</a></li>
-<li><img alt="" src="../images/down.gif" /> <a href="#cluster">URL-based sharding accross multiple backends</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#structuredhomedirs">Structured Homedirs</a></li>
-<li><img alt="" src="../images/down.gif" /> <a href="#browser-dependent-content">Browser Dependent Content</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#dynamic-mirror">Dynamic Mirror</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#reverse-dynamic-mirror">Reverse Dynamic Mirror</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#retrieve-missing-data">Retrieve Missing Data from Intranet</a></li>
@@ -434,63 +432,6 @@ while (&lt;&gt;) {
 
     </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
 <div class="section">
-<h2><a name="cluster" id="cluster">URL-based sharding accross multiple backends</a></h2>
-
-      
-
-      <dl>
-        <dt>Description:</dt>
-
-        <dd>
-          <p>A common technique for distributing the burden of 
-          server load or storage space is called "sharding". 
-          When using this method, a front-end server will use the
-          url to consistently "shard" users or objects to seperate
-          backend servers.</p>
-        </dd>
-
-        <dt>Solution:</dt>
-
-        <dd>
-          <p>A mapping is maintained, from users to target servers, in
-          external map files. They look like:</p>
-
-<div class="example"><pre>
-user1  physical_host_of_user1
-user2  physical_host_of_user2
-:      :
-</pre></div>
-
-          <p>We put this into a <code>map.users-to-hosts</code> file. The
-            aim is to map;</p>
-
-<div class="example"><pre>
-/u/user1/anypath
-</pre></div>
-
-          <p>to</p>
-
-<div class="example"><pre>
-http://physical_host_of_user1/u/user/anypath
-</pre></div>
-
-          <p>thus every URL path need not be valid on every backend physical
-          host. The following ruleset does this for us with the help of the map
-          files assuming that server0 is a default server which will be used if
-          a user has no entry in the map):</p>
-
-<div class="example"><pre>
-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
-</pre></div>
-        </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="structuredhomedirs" id="structuredhomedirs">Structured Homedirs</a></h2>
 
       
@@ -523,50 +464,6 @@ RewriteRule   ^/~(<strong>([a-z])</strong>[a-z0-9]+)(.*)  /home/<strong>$2</stro
 
     </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
 <div class="section">
-<h2><a name="browser-dependent-content" id="browser-dependent-content">Browser Dependent Content</a></h2>
-
-      
-
-      <dl>
-        <dt>Description:</dt>
-
-        <dd>
-          <p>At least for important top-level pages it is sometimes
-          necessary to provide the optimum of browser dependent
-          content, i.e., one has to provide one version for
-          current browsers, a different version for the Lynx and text-mode
-          browsers, and another for other browsers.</p>
-        </dd>
-
-        <dt>Solution:</dt>
-
-        <dd>
-          <p>We cannot use content negotiation because the browsers do
-          not provide their type in that form. Instead we have to
-          act on the HTTP header "User-Agent". The following config
-          does the following: If the HTTP header "User-Agent"
-          begins with "Mozilla/3", the page <code>foo.html</code>
-          is rewritten to <code>foo.NS.html</code> and the
-          rewriting stops. If the browser is "Lynx" or "Mozilla" of
-          version 1 or 2, the URL becomes <code>foo.20.html</code>.
-          All other browsers receive page <code>foo.32.html</code>.
-          This is done with the following ruleset:</p>
-
-<div class="example"><pre>
-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>]
-</pre></div>
-        </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="dynamic-mirror" id="dynamic-mirror">Dynamic Mirror</a></h2>
 
       
index c069e8b03576404d5be424b02bd7b9fd5dbf2102..2440a6a92d28fc22ad6c6d7cb32eeffe2de2a4d6 100644 (file)
@@ -424,63 +424,6 @@ while (&lt;&gt;) {
 
     </section>
 
-    <section id="cluster">
-
-      <title>URL-based sharding accross multiple backends</title>
-
-      <dl>
-        <dt>Description:</dt>
-
-        <dd>
-          <p>A common technique for distributing the burden of 
-          server load or storage space is called "sharding". 
-          When using this method, a front-end server will use the
-          url to consistently "shard" users or objects to seperate
-          backend servers.</p>
-        </dd>
-
-        <dt>Solution:</dt>
-
-        <dd>
-          <p>A mapping is maintained, from users to target servers, in
-          external map files. They look like:</p>
-
-<example><pre>
-user1  physical_host_of_user1
-user2  physical_host_of_user2
-:      :
-</pre></example>
-
-          <p>We put this into a <code>map.users-to-hosts</code> file. The
-            aim is to map;</p>
-
-<example><pre>
-/u/user1/anypath
-</pre></example>
-
-          <p>to</p>
-
-<example><pre>
-http://physical_host_of_user1/u/user/anypath
-</pre></example>
-
-          <p>thus every URL path need not be valid on every backend physical
-          host. The following ruleset does this for us with the help of the map
-          files assuming that server0 is a default server which will be used if
-          a user has no entry in the map):</p>
-
-<example><pre>
-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
-</pre></example>
-        </dd>
-      </dl>
-
-    </section>
-
     <section id="structuredhomedirs">
 
       <title>Structured Homedirs</title>
@@ -507,50 +450,6 @@ RewriteRule   ^/u/<strong>([^/]+)</strong>/?(.*)   http://<strong>${users-to-hos
 <example><pre>
 RewriteEngine on
 RewriteRule   ^/~(<strong>([a-z])</strong>[a-z0-9]+)(.*)  /home/<strong>$2</strong>/$1/.www$3
-</pre></example>
-        </dd>
-      </dl>
-
-    </section>
-
-   <section id="browser-dependent-content">
-
-      <title>Browser Dependent Content</title>
-
-      <dl>
-        <dt>Description:</dt>
-
-        <dd>
-          <p>At least for important top-level pages it is sometimes
-          necessary to provide the optimum of browser dependent
-          content, i.e., one has to provide one version for
-          current browsers, a different version for the Lynx and text-mode
-          browsers, and another for other browsers.</p>
-        </dd>
-
-        <dt>Solution:</dt>
-
-        <dd>
-          <p>We cannot use content negotiation because the browsers do
-          not provide their type in that form. Instead we have to
-          act on the HTTP header "User-Agent". The following config
-          does the following: If the HTTP header "User-Agent"
-          begins with "Mozilla/3", the page <code>foo.html</code>
-          is rewritten to <code>foo.NS.html</code> and the
-          rewriting stops. If the browser is "Lynx" or "Mozilla" of
-          version 1 or 2, the URL becomes <code>foo.20.html</code>.
-          All other browsers receive page <code>foo.32.html</code>.
-          This is done with the following ruleset:</p>
-
-<example><pre>
-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>]
 </pre></example>
         </dd>
       </dl>