cancel
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

dlogsdonmd
Nimbostratus
Nimbostratus

Hello,

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 deputyheartattack.org 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 (deputyheartattack.org) 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.

 

Diane

 

when HTTP_REQUEST {   if { [string tolower [HTTP::host]] contains "deputyheartattack.org" } { HTTP::respond 301 Location "deputyheartattack.acc.org[HTTP::uri]"   } }
3 REPLIES 3

Simon_Blakely
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 https://deputyheartattack.org/ -H "Host: deputyheartattack.org"

 

The normal page (deputyheartattack.org) 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.