Hi Rusty Tripp,
You can use Wildcards inside of a switch statement to make things fit and act properly as well as set a default action if none of the conditions are met.
I took your original iRule and converted. The "-" at the end of each qualifier tells the iRule that if it qualifies follow the same action as the NEXT item on the list, so in this example all of them will set the HTTP::uri value. If none of them qualify then you will be redirected.
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/" -
"/levi_b2b/init.do" -
"/bd*" { HTTP::uri "/bd/public/frameset_top_html.jsp" }
default { HTTP::redirect http://leo.levi.com/index.htm }
}
}
Hope this helps.