diff options
author | Rich Bowen <rbowen@apache.org> | 2010-05-19 03:30:26 +0200 |
---|---|---|
committer | Rich Bowen <rbowen@apache.org> | 2010-05-19 03:30:26 +0200 |
commit | f25bff819726ca31c8340ce893bf39dcf68ff23e (patch) | |
tree | d6f8018d33de6a6ca7c5d9b1f047734bf0231f3f /docs/manual/rewrite | |
parent | More information for the dbm map type. (diff) | |
download | apache2-f25bff819726ca31c8340ce893bf39dcf68ff23e.tar.xz apache2-f25bff819726ca31c8340ce893bf39dcf68ff23e.zip |
int: example.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@945991 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/manual/rewrite')
-rw-r--r-- | docs/manual/rewrite/rewritemap.html.en | 32 | ||||
-rw-r--r-- | docs/manual/rewrite/rewritemap.xml | 34 |
2 files changed, 54 insertions, 12 deletions
diff --git a/docs/manual/rewrite/rewritemap.html.en b/docs/manual/rewrite/rewritemap.html.en index 608100db6e..6c89ecf781 100644 --- a/docs/manual/rewrite/rewritemap.html.en +++ b/docs/manual/rewrite/rewritemap.html.en @@ -268,12 +268,13 @@ your <code>RewriteMap</code> directive.</p> <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.</p> 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> diff --git a/docs/manual/rewrite/rewritemap.xml b/docs/manual/rewrite/rewritemap.xml index d2fe1d3c7e..119ae676ee 100644 --- a/docs/manual/rewrite/rewritemap.xml +++ b/docs/manual/rewrite/rewritemap.xml @@ -268,14 +268,16 @@ your <code>RewriteMap</code> directive.</p> </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.</p> 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> |