Forum Discussion
Mike_Breeden_61
Nimbostratus
18 years agoHTTPS Redirect
I have the following IRule that sets the uri for an address to the following on http requests. What I want is to be able to use the same rule but also have it change from the http to https. My IRule i...
Mike_Breeden_61
Nimbostratus
18 years agoWe have fixed the issue. We had two virtual servers setup. One was listening on port 80 and the other was on port 443. To get it to work we had to make an IRule for the Virtual server on port 80 to redirect any request to https. Then the IRule on the virtual server listening on port 443 would rewrite the uri correctly.
Port 80 IRule:
when HTTP_REQUEST {
HTTP::redirect https://[HTTP::host][HTTP::uri]
log local0. "redirecting [HTTP::host][HTTP::uri]"
}
Port 443 Irule:
when HTTP_REQUEST {
if {([HTTP::host] equals "myclaytonbenefits.com" or [HTTP::host] equals "www.myclaytonbenefits.com") and
([HTTP::uri] equals "/")}
{
HTTP::uri "https://myclaytonbenefits.com/SHCM/"
}
}
Hope this helps others and I appreciate your help!!!
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
