Forum Discussion
johns
Jul 28, 2005Ret. Employee
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...
johns
Jul 28, 2005Ret. Employee
What I trying to do is, we have implementation with Trafficshiled Security gateway in b/w BIG-IP and the servers. The Trafficshield needs to have a unique VIP for each hostheader. So, I need to have the BIG-IP change the host to be unique for each directory (which indicates different site within the servers) and then rewrite them on the way out.
I was playing with getfield to pick up the directory after the host and set tn as a variable value just to see if I can get them to collect the right strings.
when HTTP_REQUEST {
set my_host [getfield [HTTP::uri] "/" 2]
set my_domain [getfield [HTTP::host] "." 2]
log local0. "my host is $my_host.$my_domain.com"
pool ts_pool
}I just need to find a way to rewrite the URI to what it was originally on the way out. Could it be as simple as storing the original URI in a variable and replace (on the way out) the one that was rewritten on the way in?
Thanks.
John
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects