summaryrefslogtreecommitdiffstats
path: root/docs/manual/rewrite/rewritemap.xml
diff options
context:
space:
mode:
authorRich Bowen <rbowen@apache.org>2010-05-19 03:30:26 +0200
committerRich Bowen <rbowen@apache.org>2010-05-19 03:30:26 +0200
commitf25bff819726ca31c8340ce893bf39dcf68ff23e (patch)
treed6f8018d33de6a6ca7c5d9b1f047734bf0231f3f /docs/manual/rewrite/rewritemap.xml
parentMore information for the dbm map type. (diff)
downloadapache2-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/rewritemap.xml')
-rw-r--r--docs/manual/rewrite/rewritemap.xml34
1 files changed, 28 insertions, 6 deletions
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>