John_Nootens_45
Mar 08, 2005Nimbostratus
Help me convert 4.x Rule to 9.x iRule
I built a rule based on everything I could find for examples and documentation in the LTM configuration guide and on devcentral, but I'm not able to get around syntax errors. I'll greatly appreciate any help in converting the 4.5.9 Rule below to a 9.0.4 iRule as I've tried here:
THIS IRULE:
iRule PSFT_Rule
when CLIENT_ACCEPTED{
if { [HTTP::uri] matches_regex "/psreports"} {
pool PSFT_Reports
} else {
pool people_soft
}
}
GAVE THESE ERROR MESSAGES:
01070151:3: Rule [PSFT_Rule] error:
line 1: [wrong args] [when CLIENT_ACCEPTED{]
line 2: [command is not valid in the current scope] [if { [HTTP::uri] matches_regex "/psreports"} {
pool PSFT_Reports
} else {
pool people_soft
}]
line 7: [command is not valid in the current scope] [}]
HERE WAS THE ORIGINAL 4.5.9 Rule:
rule PSFT_Rule {
if (http_uri matches_regex "/psreports") {
use pool PSFT_Reports
}
else {
use pool people_soft
}
}