httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rbo...@apache.org
Subject svn commit: r945991 - in /httpd/httpd/trunk/docs/manual/rewrite: rewritemap.html.en rewritemap.xml
Date Wed, 19 May 2010 01:30:26 GMT
Author: rbowen
Date: Wed May 19 01:30:26 2010
New Revision: 945991

URL: http://svn.apache.org/viewvc?rev=945991&view=rev
Log:
int: example.

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

Modified: httpd/httpd/trunk/docs/manual/rewrite/rewritemap.html.en
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/rewrite/rewritemap.html.en?rev=945991&r1=945990&r2=945991&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/rewrite/rewritemap.html.en (original)
+++ httpd/httpd/trunk/docs/manual/rewrite/rewritemap.html.en Wed May 19 01:30:26 2010
@@ -268,12 +268,13 @@ your <code>RewriteMap</code> directive.<
 <div class="section">
 <h2><a name="int" id="int">int: Internal Function</a></h2>
     
-    <p>
-           MapType: <code>int</code>, MapSource: Internal Apache httpd
-          function</p>
-    <p>Here, the source is an internal Apache httpd function.
-          Currently you cannot create your own, but the following
-          functions already exist:</p>
+
+    <p>When a MapType of <code>int</code> is used, the MapSource is one
+    of the available internal RewriteMap functions. Currently there
+    is no mechanism for creating your own functions. The available
+    functions are:
+    </p>
+
     <ul>
       <li><strong>toupper</strong>:<br />
              Converts the key to all upper case.</li>
@@ -286,6 +287,25 @@ your <code>RewriteMap</code> directive.<
              Translates hex-encodings in the key back to
             special characters.</li>
     </ul>
+
+    <p>
+    To use one of these functions, create a <code>RewriteMap</code> referencing
+    the int function, and then use that in your <code>RewriteRule</code>:
+    </p>
+
+    <div class="example"><h3>Redirect a URI to an all-lowercase version of itself</h3><p><code>
+    RewriteMap lc int:tolower<br />
+    RewriteRule (.*[A-Z]+.*) lc($1) [R]
+    </code></p></div>
+
+    <div class="note">
+    <p>Please note that the example offered here is for
+    illustration purposes only, and is not a recommendation. If you want
+    to make URLs case-insensitive, consider using
+    <code class="module"><a href="../mod/mod_speling.html">mod_speling</a></code>
instead.
+    </p>
+    </div>
+
   </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif"
/></a></div>
 <div class="section">
 <h2><a name="prg" id="prg">prg: External Rewriting Program</a></h2>

Modified: httpd/httpd/trunk/docs/manual/rewrite/rewritemap.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/rewrite/rewritemap.xml?rev=945991&r1=945990&r2=945991&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/rewrite/rewritemap.xml (original)
+++ httpd/httpd/trunk/docs/manual/rewrite/rewritemap.xml Wed May 19 01:30:26 2010
@@ -268,14 +268,16 @@ your <code>RewriteMap</code> directive.<
 </note>
 
   </section>
+
   <section id="int">
     <title>int: Internal Function</title>
-    <p>
-           MapType: <code>int</code>, MapSource: Internal Apache httpd
-          function</p>
-    <p>Here, the source is an internal Apache httpd function.
-          Currently you cannot create your own, but the following
-          functions already exist:</p>
+
+    <p>When a MapType of <code>int</code> is used, the MapSource is one
+    of the available internal RewriteMap functions. Currently there
+    is no mechanism for creating your own functions. The available
+    functions are:
+    </p>
+
     <ul>
       <li><strong>toupper</strong>:<br/>
              Converts the key to all upper case.</li>
@@ -288,7 +290,27 @@ your <code>RewriteMap</code> directive.<
              Translates hex-encodings in the key back to
             special characters.</li>
     </ul>
+
+    <p>
+    To use one of these functions, create a <code>RewriteMap</code> referencing
+    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>
+
+    <note>
+    <p>Please note that the example offered here is for
+    illustration purposes only, and is not a recommendation. If you want
+    to make URLs case-insensitive, consider using
+    <module>mod_speling</module> instead.
+    </p>
+    </note>
+
   </section>
+
   <section id="prg"><title>prg: External Rewriting Program</title>
   
 <p>MapType: <code>prg</code>, MapSource: Unix filesystem path to valid
regular file </p>



Mime
View raw message