Forum Discussion
Mike_Breeden_61
Nimbostratus
Oct 03, 2008HTTPS 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 is shown below. Please help
when HTTP_REQUEST {
if {([HTTP::host] equals "myclaytonbenefits.com") and
([HTTP::uri] equals "/")}
{
HTTP::uri "http://myclaytonbenefits.com/SHCM/"
}
}
3 Replies
- Arie
Altostratus
You're only changing the URI that's sent to the server; there is no change on the client side. If you need to change it to https presumably you want to use SSL between the client and the server (rather than just between the Big-IP and the server). In that case you'll want to use a redirect: - Mike_Breeden_61
Nimbostratus
Thanks but I want it to work like this - Mike_Breeden_61
Nimbostratus
We 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.
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