Forum Discussion
Https to https redirection
Hi All,
I am having trouble to rewrite an iRule in F5 for HTTPS to HTTPS. Here is my current iRULE(see below) and i want to redirect it as https://xyz.com.au to https://xyz.com .We have certificate installed for *.xyz.com on the F5. Can anyone please help me here
Current iRule
when HTTP_REQUEST { if { [string tolower [HTTP::host]] equals "; } { HTTP::respond 301 Location "; } }
1 Reply
- Stanislas_Piro2
Cumulonimbus
Hi, the code may work (I removed the semi-colon in if condition)
when HTTP_REQUEST { if { [string tolower [HTTP::host]] equals "www.xyz.com.au" } { HTTP::respond 301 Location "https://www.xyz.com"; } }
But as ssl is negotiated before the http request is sent by the browser, you will have an ssl error due to ssl mismatch before redirect.
You must have a certificate for to prevent ssl error. You can then configure SNI to send right certificate based on server name extension.
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