Forum Discussion
Jakub_Hornik_16
Nimbostratus
Jun 20, 2014URi based redirection only if pool members are available.
Hello everyone.
I am a newbie to iRules thus I apologize for any dumb questions in advance for foreseeable future. I have this iRule which does simple redirection based on URI:
when HTTP_REQUEST { ...
Jun 20, 2014
Hi!
Sorry mate, I understood it as you had another pool for the error pages.
If you have the same pool I'd disable the priority group activation and use an iRule like this one instead (omit the pool command if the default pool is the one you intend to use):
when HTTP_REQUEST {
if { [active_members http_pool] >= 2 } {
if { [HTTP::host] equals "example.com" and ( [HTTP::uri] equals "/" or [HTTP::uri] equals "/example-client" or [HTTP::uri] equals "/example-client//" ) } {
HTTP::redirect "https://example.com/example-client/login"
}
} else {
HTTP::uri "/errorpage"
}
}
Does that make sense?
/Patrik
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