Forum Discussion
rodrigo_Benzaqu
Nimbostratus
Oct 03, 2006Need Help to Migrate Rule from V4 to V9
Hi Guys,
I have to move the following Rule from v4.x to V9.x. I,m trying to use "case" instead of "if", but it´s giving me syntax error:
rule Cache_Fetch {
if (http_uri starts_with "/jm/pms" or http_uri starts_with "/cgi/pms/") {
use pool PMS_java
}
else {
if (http_uri starts_with "/jm/" or http_uri starts_with "/jms/" or http_uri starts_with "/servlet/" or http_uri ends_with "_JM
" or http_uri ends_with "_JSEA" or http_uri starts_with "/dwr/") {
use pool Java_Servers
}
else {
if (http_uri contains "/ml/") {
use pool SQL_Servers
}
else {
use pool static_server
}
}
}
}
thanks for your help,
Rodrigo
- I'd use a switch statement myself...
when HTTP_REQUEST { switch -glob [HTTP::uri] { "/jm/pms*" - "/cgi/pms/*" { pool PMS_java } "/jm/*" - "/jms/*" - "/servlet/*" - "*_JM" - "*_JSEA" - "/dwr/*" { pool Java_Servers } "*/ml/*" { pool SQL_Servers } default { pool static_server } } }
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