| Posted: 08 October 2008 at 3:41am | IP Logged
|
|
|
< http-equiv="Content-" content="text/; charset=utf-8">< name="ProgId" content="Word.">< name="Generator" content="Microsoft Word 12">< name="Originator" content="Microsoft Word 12"><link rel="File-List" href="file:///C:%5CDOCUME%7E1%5CDAVID%7E1.MUK%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" target="_blank"><link rel="themeData" href="file:///C:%5CDOCUME%7E1%5CDAVID%7E1.MUK%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" target="_blank"><link rel="colorSchemeMapping" href="file:///C:%5CDOCUME%7E1%5CDAVID%7E1.MUK%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" target="_blank">< style>
I am trying to write a set of rules that will allow to rewrite a domain name and when the request points to a specific folder, I want to extract the value of a specific querystring parameter, transforming it into a folder.
Here is a set of pseudo-rules that I
want to rewrite as regular expressions.
Conventions used in the pseudo-ruleset:
$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
3.
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
|