Hi,
You should use the iRule editor since the iRule editor is more flexible than through the GUI i.e a space forgotten may create syntax issue.
For example in the GUI you should add a space between } and { for a if statement
Try this one:
when HTTP_REQUEST {
log local0. "Current URI: [HTTP::uri]"
if {[HTTP::uri] starts_with "/test" } {
if {[HTTP::uri] ends_with "/test" } {
HTTP::uri "/test/jsp/common/pgLogin.jsp"
}
pool state_test_pool
} elseif {[HTTP::uri] starts_with "/dev"} {
if {[HTTP::uri] ends_with "/dev" } {
HTTP::uri "/dev/jsp/common/pgLogin.jsp"
}
pool state_dev_pool
} elseif {[HTTP::uri] starts_with "/train"} {
if {[HTTP::uri] ends_with "/train" } {
HTTP::uri "/train/jsp/common/pgLogin.jsp"
}
pool state_train_pool
}
}
If it doesn't work i would strongly advise to use the iRule editor, if not possible then here a way to find your syntax error message:
Remove all your iRule in a notepad for example and insert it back piece by piece. This way as soon as you have the syntax error message you'll find the culprit area. Works fine usually, not the most convenient way but the sytanx error message can tell you the wrong line sometimes!
HTH