Forum Discussion
Michael_Yates
Jul 11, 2011Nimbostratus
You could do something like what I have below.
When doing it this way the item in the switch statement is absolute, so what I have below "/test/maddy/*" contains the wildcard so that this would equal { [HTTP::uri] starts_with "/test/maddy" }.
This should also make it easier to add to in the future.
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/" { HTTP::redirect "http://dev.abc.com/test" }
"/test/maddy/*" { pool web_maddy_pool_port_9001 }
default { pool Development_TEST_pool_port_7789 }
}
}