Forum Discussion
Bob_10976
Jul 11, 2011Nimbostratus
Help with HTTP redirect in ALL directions
Hello all,
We have been using the standard HTTP redirect irule, (posted below) that comes with our LTM, ver 10.2.0, for sometime now. However I'm being told now that this not only needs to be a...
Hi Bob,
If you want to redirect HTTP traffic to HTTPS you can use an iRule which redirects all requests to HTTPS:
when HTTP_REQUEST {
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
}
If you want to avoid cert mismatch errors based on hostname you could create an HTTP to HTTPS redirect rule which is specific to the virtual server and then hardcode the hostname:
when HTTP_REQUEST {
HTTP::redirect "https://www.example.com[HTTP::uri]"
}
Aaron
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