From: Rich Bowen Date: Wed, 19 May 2010 01:30:26 +0000 (+0000) Subject: int: example. X-Git-Tag: 2.3.6~104 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f25bff819726ca31c8340ce893bf39dcf68ff23e;p=apache int: example. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@945991 13f79535-47bb-0310-9956-ffa450edef68 --- 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 RewriteMap directive.

int: Internal Function

-

- MapType: int, MapSource: Internal Apache httpd - function

-

Here, the source is an internal Apache httpd function. - Currently you cannot create your own, but the following - functions already exist:

+ +

When a MapType of int 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: +

+ + +

+ To use one of these functions, create a RewriteMap referencing + the int function, and then use that in your RewriteRule: +

+ +

Redirect a URI to an all-lowercase version of itself

+ RewriteMap lc int:tolower
+ RewriteRule (.*[A-Z]+.*) lc($1) [R] +

+ +
+

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 + mod_speling instead. +

+
+
top

prg: External Rewriting Program

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 RewriteMap directive.

+
int: Internal Function -

- MapType: int, MapSource: Internal Apache httpd - function

-

Here, the source is an internal Apache httpd function. - Currently you cannot create your own, but the following - functions already exist:

+ +

When a MapType of int 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: +

+
  • toupper:
    Converts the key to all upper case.
  • @@ -288,7 +290,27 @@ your RewriteMap directive.

    Translates hex-encodings in the key back to special characters.
+ +

+ To use one of these functions, create a RewriteMap referencing + the int function, and then use that in your RewriteRule: +

+ + Redirect a URI to an all-lowercase version of itself + RewriteMap lc int:tolower
+ RewriteRule (.*[A-Z]+.*) lc($1) [R] +
+ + +

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 + mod_speling instead. +

+
+
+
prg: External Rewriting Program

MapType: prg, MapSource: Unix filesystem path to valid regular file