Showing results for 
Search instead for 
Did you mean: 
Login & Join the DevCentral Connects Group to watch the Recorded LiveStream (May 12) on Basic iControl Security - show notes included.

HTTP::respond iRule Not Working



I'm trying to determine why an iRule to redirect a domain to a different domain is not working. I believe we have the iRule properly configured, but I want to check with the experts here to be sure. The rule is below.


I suspect the issue is a DNS related. The domain A record in DNS (Network Solutions) for is configured to point to the IP of a VIP on our LTM. We then have a number of CNAME records in internal DNS which point to that VIP. This particular domain ( does not have a CNAME record internally or externally. If this is a domain issue, I'm not sure where it is, so far.


Appreciate any insight anyone can provide.




when HTTP_REQUEST {   if { [string tolower [HTTP::host]] contains "" } { HTTP::respond 301 Location "[HTTP::uri]"   } }

F5 Employee
F5 Employee

What error do you get in the browser?


Use the browser Developer Tools (F12, Network tab) to see if the redirection response is sent to the browser.


Or check with a curl request.

# curl -kv -H "Host:"


The normal page ( loads still, just gives an expected SSL error. So, clearly it's not reaching the LB for some reason.


Can you verify my irule is valid? I'm pretty sure it is, just want another set of eyes.

The irule looks OK.


I'm not sure what is going on.