Forum Discussion
crush09_18103
Aug 21, 2012Nimbostratus
Redirect
So this is what I'm trying to do... We have a production webpage (virtual server/pool) with basic health monitors. We have a maintenance webpage (virtual server/pool). So the application guys wa...
nitass
Aug 21, 2012Employee
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
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects