httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chen, Charles" <Charles.C...@vignette.com>
Subject RE: [users@httpd] RE: case insensitive rewrite rules and nested mapping
Date Tue, 05 Sep 2006 13:41:31 GMT
Thanks Bob! That works!


I didn't know I could use $1 in this way: i.e., back referenced in
condition before the rule.



Cheers



Charles




-----Original Message-----
From: Bob Ionescu [mailto:bobsiegen@googlemail.com] 
Sent: 05 September 2006 14:26
To: users@httpd.apache.org
Subject: Re: [users@httpd] RE: case insensitive rewrite rules and nested
mapping

Chen, Charles wrote:
> here, "/NeWs" first mapped to all upper case "NEWS" and then used to
> lookup another map in which I have a line like this:
> # my text map file
> 
> NEWS  /some/other/url

What about using a condition to get the value:

RewriteMap somemap txt:somemap.map
RewriteMap toupper int:toupper
RewriteCond ${toupper:$1} ^(.*)
RewriteRule ^/(NEWS)$ http://realserver/${somemap:%1} [NC,P]

You'd like to pass the request to mod_proxy, right?

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server
Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message