Forum Discussion
nitass
May 07, 2015Employee
I'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
}
}
}