johns
Jul 28, 2005Employee
Using URI to rewrite host
I am trying to come up with a rule where the first directory name of the uri is used to rewrite the URL. an example will be:
http://www.foo.com/abc/doc/index.html =>
http://abc.foo.com/abc/doc/index.html.
I want to make it so that the rule is general enough to be applied to multiple sites like this. I am thinking I will probably have to use regex to parse up to the second "/" after the URL and store that in a variable, then constrcut URL from that. Is that possible?
Thanks.