lunitic_56137
Aug 15, 2012Nimbostratus
Switch statement not working
I have an 11.2 deployment that is using this iRule. The issue is that the Switch statement will not work.
"when HTTP_REQUEST {
switch -glob [HTTP::uri] {
"/uri1" -
"/uri2" {
HTTP::redirect "https://newvirtual.server.com"
}
"/uri3" -
"/uri4" {
node 1.1.1.1 80
}
}
if { [matchclass [HTTP::uri] contains uri_address_external_file ] } {
log local0. "Match found Sending to J2EE_Pool"
pool J2EE_Pool
}
else {
log local0. "No match in the list. Forwarding to Offsite destination"
HTTP::redirect "http://other.site.com"
}
}"
Originally I had it between the IF and the ELSE and it worked. Moving it up to the top makes it not work at all. Ideas?