Shurton
Jun 19, 2020Nimbostratus
irule for pool selection based on URI
I lifted this portion of an irule from a bigger one used elsewhere and I can't get the syntax right.
I basically need the URI examined, and if it matches one in the list (test1, test2,test,3) then forward to pool ONPREM, otherwise send to pool CLOUD.
when HTTP_REQUEST {
set host [HTTP::host]
set uri [HTTP::uri]
switch -glob [string tolower $host] {
"HOSTNAME" {
switch -glob [string tolower $uri] {
"/test1*" -
"/test*" -
"/test3*" -
{
pool ONPREM
}
else {
pool CLOUD
}