For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

johns's avatar
johns
Ret. Employee
Jul 28, 2005

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.

25 Replies