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...
nitass
Employee
May 07, 2015I'm looking to only redirect if the request contains /C, other requests should always go to the other pools.
e.g.
when RULE_INIT {
pool names
set static::poola "a"
set static::poolb "b"
set static::poolc "c"
set static::pooldefault "default"
}
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/a/*" {
pool $static::poola
}
"/b/*" {
pool $static::poolb
}
"/c/*" {
if { [active_members $static:poolc] > 0 } {
pool $static::poolc
} else {
pool $static::pooldefault
}
}
default {
do something
}
}
}
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