Can you provide any more details? It's hard to figure out from here without knowing the test cases you are passing in and what results you are seeing (or not).
The one thing that sticks out is that I'm not sure if you can call the "node" command and then call the "pool" command. If the URI is "/uri3" and it also is returned from the matchclass command, you could have both commands executing. That may work, but I'm not sure.
I'd start with some logging. You can throw in "log local0. 'blah blah blah'" before each of the other commands and look in the /var/log/ltm file to see if the logic is working.
If you don't want the if/else logic processed if one of the previous "switch" matches passes, then you can include it in a default case for the switch
switch -glob [HTTP::uri] {
"/uri1" -
"/uri2" {
HTTP::redirect ...
}
"/uri3" -
"/uri4" {
node 1.1.1.1 80
}
default {
if { [matchclass ... } {
pool J2EE_pool
} else {
HTTP::redirect http://other.site.com
}
}
}
Not sure if that will help or not, but hopefully lead you in the right direction.
-Joe