Forum Discussion
JamesCrk
Nov 15, 2023Cirrus
F5 irule redirect with healthcheck
Hi guys, how can we do something like so: when HTTP_REQUEST {
if { [HTTP::host] eq "mainsite.com" } {
(check here is http://site1.com up and responding - if yes)
HTTP::redirect http://...
mwi
Nov 15, 2023Altocumulus
i havent testet it, but i think it should work if you put site1.com in a pool with a http monitor and check active_members.
Something like that
when HTTP_REQUEST {
if { [HTTP::host] eq "mainsite.com" } {
if { [active_members pool_site1] > 0 } {
HTTP::redirect http://site1.com
} Else {
HTTP::redirect http://site2.com
}
}
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