Forum Discussion
nitass
Oct 04, 2011Employee
sorry i think this may be easier.
[root@tulip:Active] config b virtual bar list
virtual bar {
destination 172.28.17.66:http
ip protocol tcp
rules myrule
profiles
http
tcp
}
[root@tulip:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
if {[string tolower [HTTP::host]] ends_with "oursite.com" and [string tolower [HTTP::uri]] starts_with "/theirsite"} {
HTTP::redirect "http://www.theirsite.com[string range [HTTP::uri] 10 end]"
}
}
}
[root@tulip:Active] config curl -I http://www.oursite.com/theirsite/test/about.shtml
HTTP/1.0 302 Found
Location: http://www.theirsite.com/test/about.shtml
Server: BigIP
Connection: Keep-Alive
Content-Length: 0