Forum Discussion
EBL_27513
Apr 13, 2015Nimbostratus
iRule - Is it possible to select a different pool and do an http redirect without infinite loop?
Hi all, I'm a relative amateur when it comes to crafting iRules, so thought I'd come to the experts and plead for any suggestions you'd be kind enough to offer! I've been asked to create an i...
cjunior
Apr 13, 2015Nacreous
Hi, you might be using an improper event for this purpose.
I made some changes and it might work. Hope it helps you. [] when HTTP_REQUEST {
if { [active_members [LB::server pool]] < 1 } {
if { [string tolower [URI::decode [HTTP::uri]]] starts_with "/ohrcc/pages/client" } {
log local0. "iRule:client-maintenance - routing to maintenance pool"
Use this
use pool client-maint
Or
HTTP::respond 302 Location "https://client.accenture.com/test/maintenance-page.htm"
}
elseif { [string tolower [URI::decode [HTTP::uri]]] starts_with "/placeholder-check-for-future-maintenance-pages" } {
log local0. "iRule:future-maintenance - routing to maintenance pool"
use pool future-maint
} else {
log local0. "iRule:Lantmannen-maintenance - routing to normal pool"
use pool normal-pool
}
}
}
when LB_FAILED {
persist none
LB::reselect
}
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