e.g.
[root@ve10:Active] config b virtual bar list
virtual bar {
snat automap
pool foo
destination 172.28.19.79: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::status] == 503} {
HTTP::redirect "http://www.google.com"
}
}
}
on client
[root@centos251 ~] curl -I http://172.28.19.79
HTTP/1.0 302 Found
Location: http://www.google.com
Server: BigIP
Connection: close
Content-Length: 0
on bigip
[root@ve10:Active] config ssldump -Aed -nni 0.0 port 80
New TCP connection 1: 172.28.19.251(49585) <-> 172.28.19.79(80)
1349270493.5390 (0.0010) C>S
---------------------------------------------------------------
HEAD / HTTP/1.1
User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
Host: 172.28.19.79
Accept: */*
---------------------------------------------------------------
New TCP connection 2: 200.200.200.10(49585) <-> 200.200.200.101(80)
1349270493.5401 (0.0009) C>S
---------------------------------------------------------------
HEAD / HTTP/1.1
User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
Host: 172.28.19.79
Accept: */*
---------------------------------------------------------------
1349270493.5422 (0.0021) S>C
---------------------------------------------------------------
HTTP/1.1 503 Service Temporarily Unavailable
Date: Wed, 03 Oct 2012 13:37:49 GMT
Server: Apache/2.2.3 (CentOS)
Retry-After: 18000
Connection: close
Content-Type: text/html; charset=iso-8859-1
---------------------------------------------------------------
1349270493.5423 (0.0032) S>C
---------------------------------------------------------------
HTTP/1.0 302 Found
Location: http://www.google.com
Server: BigIP
Connection: close
Content-Length: 0
------------------------------------------------------