Forum Discussion
Gazzu
Nimbostratus
Nov 10, 2017I-rule redirection
we have a DNS record "; this record is actually a CNAME for one of our load balancers which is a1.www2.xyz.com (10.xx.yy.60)
This load balancer is HTTPS forced so it goes to HTTPS all the time
I...
Andy_McGrath
Cumulonimbus
Nov 10, 2017You can redirect from http://www.xyz.com to https://a1.www2.xyz.com with a Policy or iRule with easy on the F5 LTM.
iRule would be as follows, just update the FQDNs and apply to your HTTP Virtual Server:
when HTTP_REQUEST {
if {[string tolower [HTTP::host]] eq "www.xyz.com"} {
HTTP::redirect "https://a1.www2.xyz.com[HTTP::uri]"
}
}
Alternatively if you want to only redirect if the client sends a request for a1.www2.xyz.com then the following should work:
when HTTP_REQUEST {
if {[string tolower [HTTP::host]] eq "a1.www2.xyz.com"} {
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
}
}
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
