Forum Discussion
maher_69299
Nimbostratus
Mar 01, 2010HTTPS Redirect
Can you please tell me what is wrong with this IRULE. It works fine for HTTP but I couldn't make it to work for HTTPS.
when HTTPS_REQUEST {
Check if host header value is not www.xxx.com
if {not ([string tolower [HTTPS::host]] eq "www.xxx.com")}{
Send a 301 redirect
HTTPS::respond 301 Location "https://www.xxx.com/"
}
}
Here is the error message I get
01070151:3: Rule [HTTPS-Redirect-Irule] error:
line 1: [unknown event (HTTPS_REQUEST)] [when HTTPS_REQUEST {
Check if host header value is not www.xxx.com
if {not ([string tolower [HTTPS::host]] eq "www.xxx.com")}{
Send a 301 redirect
HTTPS::respond 301 Location "http://www.xxx.com/"
}
}]
Thanks
- maher_69299
Nimbostratus
When I am trying to accomplish is that when a user types the IP address https://xx.yy.zz.dd he will be redirected to https://www.xxx.com. It works for HTTP but not HTTPS - The_Bhattman
Nimbostratus
Hi Maher, - maher_69299
Nimbostratus
Thanks for the reply. We don't terminate SSL on the F5 so is there a way to change the IP to a domain name when the user type HTTPS://xx.xx.xx.xx - JRahm
Admin
No, if you are not terminating, the BIG-IP has no visibility to the traffic above layer4. - The_Bhattman
Nimbostratus
Hi Maher, - David_Cheok_205
Nimbostratus
Sorry, I'm trying to do the same, so continuing from this thread. Would this suffice? - hoolio
Cirrostratus
Hi David,
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects