Forum Discussion
nitass
Jan 15, 2013Employee
e.g.
[root@ve10:Active] config b virtual bar80 list
virtual bar80 {
snat automap
pool foo
destination 172.28.19.252:80
ip protocol 6
rules myrule
profiles {
http {}
tcp {}
}
}
[root@ve10:Active] config b pool foo list
pool foo {
members 200.200.200.101:80 {}
}
[root@ve10:Active] config b rule myrule list
rule myrule {
when HTTP_RESPONSE {
if { [HTTP::is_redirect]} {
HTTP::header replace Location "[string map -nocase [list inside1.net fqdn.com inside2.net fqdn.com] [HTTP::header value Location]]"
}
}
}
original response
[root@ve10:Active] config curl -I http://200.200.200.101/something1
HTTP/1.1 302 Found
Date: Tue, 15 Jan 2013 04:17:33 GMT
Server: Apache/2.2.3 (CentOS)
Location: http://inside1.net/somethingone
Content-Type: text/html; charset=iso-8859-1
[root@ve10:Active] config curl -I http://200.200.200.101/something2
HTTP/1.1 302 Found
Date: Tue, 15 Jan 2013 04:17:34 GMT
Server: Apache/2.2.3 (CentOS)
Location: http://inside2.net/somethingtwo
Content-Type: text/html; charset=iso-8859-1
response through bigip
[root@ve10:Active] config curl -I http://172.28.19.252/something1
HTTP/1.1 302 Found
Date: Tue, 15 Jan 2013 04:19:27 GMT
Server: Apache/2.2.3 (CentOS)
Location: http://fqdn.com/somethingone
Content-Type: text/html; charset=iso-8859-1
[root@ve10:Active] config curl -I http://172.28.19.252/something2
HTTP/1.1 302 Found
Date: Tue, 15 Jan 2013 04:19:28 GMT
Server: Apache/2.2.3 (CentOS)
Location: http://fqdn.com/somethingtwo
Content-Type: text/html; charset=iso-8859-1