Forum Discussion
Sheigh_65772
Cirrus
Sabaris,
Either one of these should work, though I believe the second one consumes less resources due to the switch statement. The 'string tolower' doesn't have to be in there, though it could also be in both, just depends how you want to do it.
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/newapp" } {
use pool pool_abc_newapp
} else {
use pool pool_abc
}
}
when HTTP_REQUEST {
set uri [string tolower [HTTP::uri]]
switch -glob $uri {
"/newapp*" {
use pool pool_abc_newapp
}
default {
use pool pool_abc
}
}
Sabari_Nath_179
Dec 04, 2014Nimbostratus
Hi...writing the iRule for redirecting to seperate pools is fine. The question here is if these two pools can be mapped under the same virtual server VIP. If not can a pool be created amd not relate to any VIP and still redirecting traffic to that stand alone pool will still work