URL based redirection using irules is not working
I have problem in my F5 irules the scenario is as follows, appreciate your help in this issue
Http://Dev.abc.com/TEST is my primary URL in this /TEST is the contest root redirected by web server now my requirement is when F5 gets request for a URI "/TEST/Maddy" it has to go to a different pool. I have created rule as follows but it is not redirecting for the "/TEST/Maddy"
when
HTTP_REQUEST {
if
{ ([HTTP::uri] contains "/TEST/maddy")}{
pool web_maddy_pool_port_9001
}
if
{ [string tolower [HTTP::uri]] equals "/" } {
HTTP::redirect "http://dev.abc.com/TEST"
}
else {
pool
Development_TEST_pool_port_7789
}
}
Web_maddy_pool_port_9001 - has IPs of weblogic cluster for Maddy pool
Development_TEST_pool_port_7789
- has IPs of weblogic cluster for default pool
Appreciate your help