Forum Discussion
jpars_136473
Nimbostratus
May 06, 2015iRule to redirect based on availability
Hi There,
I am looking to implement a redirect on web traffic based on the availability of a specific web pool.
I have 3 pools which are front ended by one VIP that uses an iRule to direct traff...
Samir_Jha_52506
Noctilucent
May 06, 2015Hi, I agree with @nitass comments. You need to verify 1st Pool_C status. I guess, it require two iRule to check the connection. Status of Pool C. If it is up then it traffic will go to 2nd iRule.
Rule 1(make 1st iRule)
when HTTP_REQUEST {
if { [active_members pool_c] < 1 } {
HTTP::redirect http://failoverurl
return
}
}
Rule 2. Redirect traffic based on the condition.
when HTTP_REQUEST {
set uri [string tolower [HTTP::path]]
switch -glob $uri {
"/A/" { pool A }
"/B/" { pool B }
"/C/" { pool C }
}
}
Hope it will work..
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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