Brent_Sachnoff_
Oct 23, 2007Nimbostratus
Using switch with uri
I'm having some issues using the switch command and uri's. I believe the switch command is only for EQUALS to something for it to work properly which means this wouldn't work at all. Here is a sample:
when HTTP_REQUEST {
switch [HTTP::uri] {
"/search/" { pool search }
"/int_search/" { pool search }
"/pictures/" { node 10.4.43.1 80 }
"/" { HTTP::redirect "https://[HTTP::host]/IMT/LoginAction.go" }
default {
pool www
}
}
}
is there a way to "match" vs equal on the uri in a switch statement?
starts_with "/search" or starts_with "/int_search/"
Thanks!
Brent