I am trying to set an iRule to redirect HTTP request to a different URL. Basically for testing purpose, I created a WideIP which resolves to a WebServer which displays a Blue Page. I added a CNAME in DNS calling it Test Blue so what I want is to redirect anything that has testblue in the URL to redirect to an internal webpage called
This is the iRule I am using but I am getting errors
when HTTP_REQUEST { if { (([HTTP::host] contains “testblue”)) } { HTTP::redirect "; } }
Where are you editing the rule? In the iRule editor? or in the GUI itself? The error comes back how? In the logs? Or in the mechanism you’re using to add it?
At a guess, it looks like you’ve added an iRule as an HTTP_REQUEST event that has as it’s first line ‘event HTTP_REQUEST’… (Sorry, not got access today to my test box to verify that myself)