Forum Discussion
HTTP::respond iRule Not Working
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]"
}
}
- Simon_Blakely
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"
- dlogsdonmd
Nimbostratus
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.
- Simon_Blakely
Employee
The irule looks OK.
I'm not sure what is going on.
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com