just another example.
root@(ve11a)(cfg-sync Changes Pending)(Active)(/Common)(tmos) list ltm virtual bar
ltm virtual bar {
destination 172.28.20.111:80
ip-protocol tcp
mask 255.255.255.255
pool foo
profiles {
http { }
tcp { }
}
rules {
qux
}
source 0.0.0.0/0
source-address-translation {
type automap
}
vlans-disabled
}
root@(ve11a)(cfg-sync Changes Pending)(Active)(/Common)(tmos) list ltm pool foo
ltm pool foo {
members {
200.200.200.101:80 {
address 200.200.200.101
}
200.200.200.111:80 {
address 200.200.200.111
}
}
}
root@(ve11a)(cfg-sync Changes Pending)(Active)(/Common)(tmos) list ltm rule qux
ltm rule qux {
when HTTP_RESPONSE {
if { [HTTP::is_redirect] } {
HTTP::header replace Location [string map {MyHost01.domainname.com newHost.com MyHost02.domainname.com newHost.com} [HTTP::header Location]]
}
}
}
original response
[root@ve11a:Active:Changes Pending] config curl -I http://200.200.200.101/something
HTTP/1.1 302 Found
Date: Sat, 06 Jul 2013 08:04:13 GMT
Server: Apache/2.2.3 (CentOS)
Location: http://MyHost01.domainname.com/somethingelse
Connection: close
Content-Type: text/html; charset=iso-8859-1
[root@ve11a:Active:Changes Pending] config curl -I http://200.200.200.111/something
HTTP/1.1 302 Found
Date: Sat, 06 Jul 2013 08:04:11 GMT
Server: Apache/2.2.3 (CentOS)
Location: http://MyHost02.domainname.com/somethingelse
Content-Type: text/html; charset=iso-8859-1
response after passing bigip
[root@ve11a:Active:Changes Pending] config curl -I http://172.28.20.111/something
HTTP/1.1 302 Found
Date: Sat, 06 Jul 2013 08:04:26 GMT
Server: Apache/2.2.3 (CentOS)
Location: http://newHost.com/somethingelse
Content-Type: text/html; charset=iso-8859-1