I've actually tried that way as well but ti didn't work. It seems to me that the iRules is being entered multiple times ( I see this using the LOG command ).
Here is some information from the log file. All this occured from just one hit ( the first BD is just an indicator to which If statement I took:
bd - uri = /bd
bd - uri = /bd/
bd - uri = /bd/public/frameset_top_html.jsp
bd - uri = /bd/frameset_application.sap
bd - uri = /bd/navigation_top.sap
bd - uri = /bd/startEBPP.sap
bd - uri = /bd/navigation.sap
Here is my latest effort as writing this iRule:
when HTTP_REQUEST {
switch [string tolower [HTTP::uri]] {
"/" { HTTP::uri "/levi_b2b/init.do"}
"/levi_b2b" { HTTP::uri "/levi_b2b/init.do"}
"/docs" { HTTP::uri "/docs/index.html"}
"/bd" { HTTP::uri "/bd/public/frameset_top_html.jsp"}
default { HTTP::redirect "http://leo.levi.com/index.htm" }
}
}