another way.
[root@ve10:Active] config b virtual prod list
virtual prod {
snat automap
pool prodpool
destination 172.28.19.79:80
ip protocol 6
rules myrule
profiles {
http {}
tcp {}
}
}
[root@ve10:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
if {[LB::status pool foo member 172.28.19.89 80] eq "up"} {
HTTP::redirect "http://172.28.19.89"
}
}
}
[root@ve10:Active] config b pool foo list
pool foo {
monitor all myhttp
members 172.28.19.89:80 {}
}
[root@ve10:Active] config b monitor myhttp list
monitor myhttp {
defaults from http
dest 172.28.19.89:80
recv "down"
send "GET /test.html HTTP/1.1\r\nHost: \r\nConnection: Close\r\n\r\n"
}
[root@ve10:Active] config curl http://172.28.19.89/test.html
down
[root@ve10:Active] config b pool foo|grep -i pool
POOL foo LB METHOD round robin MIN/CUR ACTIVE MEMBERS 0/1
+-> POOL MEMBER foo/172.28.19.89:80 active,up
[root@ve10:Active] config curl -I http://172.28.19.79
HTTP/1.0 302 Found
Location: http://172.28.19.89
Server: BigIP
Connection: Keep-Alive
Content-Length: 0