Forum Discussion
dem_23523
Nimbostratus
Sep 24, 2007Convert rule from 4.x to 9.3
We have a simple rule in 4.5 that chooses a pool based on the URI (below). We're now upgrading to a new BigIP with 9.3, and I'm not familiar enough with the new syntax and options yet. Could someone s...
JRahm
Admin
Sep 24, 2007You could try a switch:
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/isadmin/isreps/*" -
"/isadmin/issf/*" -
"/isadmin/ismailrouting/*" -
"/isadmin/isagentconsole/*" {
pool reps-80
}
"/isadmin/issearch/*" {
pool search-80
}
"/isadmin/isutils/*" {
pool utils-80
}
"/isadmin/isresplib/*" {
pool nice-80
}
default {
discard
}
}
}Otherwise, if you want to maintain your if /elseif:
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] starts_with "/isadmin/isreps"} {
pool reps-80
} elseif { [string tolower [HTTP::uri]] starts_with "/isadmin/issf"} {
pool reps-80
} elseif {... } {
} else { discard }
}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