Forum Discussion
Jun 19, 2006
There are a couple of issues here.
First, you have three HTTP_REQUEST events in your rule. Consolidate all your logic into a single when statement.
Second, here's the breakdown for a url
http://www.foo.com/bar
http://[HTTP::host][HTTP::uri]
In this case [HTTP::host] would be "www.foo.com"
and [HTTP::uri] would be "/bar".
You are comparing the URI (HTTP::uri) to both the HTTP::host and HTTP::uri.
You can either rearrange your logic to compare both the host and uri with a logical "and" or break it down into multiple if/elses. Or, if you want to be a real geek, go for a switch statement (search the forums for switch examples). If you get stuck, either search the forums or browse the CodeShare section of the iRules Wiki, there are a bunch of examples in there of exactly this functionality.
-Joe