| Posted: 07 October 2008 at 8:43am | IP Logged
|
|
|
Hi Anton,
I tried the config you gave me and it seems that %{QUERY_STRING} is a feature specific to version 3. The server on which i need to implement this runs 2.10.0.53 and changing that is out my jurisdiction. Whatever I do must work without installing new stuff.
Here is a pseudo set of rules that I wanna rewrite as
regex.
Conventions used in the pseudo rule set:
$Variable name Text to be captured Text to be dropped Captured or injected text
Although it may be possible to implement this using fewer but more complex rules, it’ll be easier to maintain if I
implemented it as modular solution comprised of 4 separate rules as follows:
1. Request
URL starts with “http://oldDomain.com/specialFolder$restofURL”
Rewrite URL as “http://newDomain.com/specialFolder$restofURL”.
Continue processing
2. Request
URL starts with “http://newDomain.com/specialFolder?sprmName=$prmValue&$restOfQuerystring”,
Rewrite URL as “http://newDomain.com/specialFolder/$prmValue?$restofQuerystring”
Stop processing
Request URL is in the format “http://newDomain.com/specialFolder?$querystringFragment1&prmName=$prmValue&$restofURL
Rewrite URL as “http://newDomain.com/specialFolder/$prmValue?$querystringFragment1&$restofURL”
Stop processing
I would appreciate your help with this. I hope this makes sense.
Thanks,
David
Edited by David Mukaiwa - 08 October 2008 at 3:21am
|