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 suggest an efficient way to implement this rule?
if (http_uri starts_with "/isadmin/isreps") {
use pool reps-80
}
else if (http_uri starts_with "/isadmin/issf") {
use pool reps-80
}
else if (http_uri starts_with "/isadmin/issearch") {
use pool search-80
}
else if (http_uri starts_with "/isadmin/isutils") {
use pool utils-80
}
else if (http_uri starts_with "/isadmin/ismailrouting") {
use pool reps-80
}
else if (http_uri starts_with "/isadmin/isresplib") {
use pool nice-80
}
else if (http_uri starts_with "/isadmin/isagentconsole") {
use pool reps-80
}
else {
discard
}
- JRahm
Admin
You 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 } } }
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 } }
- dem_23523
Nimbostratus
Thanks! I'll give this a try.
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