Forum Discussion
HTTP to HTTPS iRule
I have two VS that share the same IP
I have two pools one that contains by back-end servers listening on Port 80 and another that contains the same servers but listening on port 443.
How would I write up an iRule that says if anyone types : Http://* please use the pool that is listening on port 443.
This way they wont get an error when trying http but will get redirected to https.
If there's a better way to do it, I'm also open to suggestions.
Thanks!
1 Reply
- Hamish
Cirrocumulus
Use the _sys_https_redirect rule on the HTTP VS's.
It's literally
when HTTP_REQUEST { HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri] }Oh, and remove the pool from the HTTP VS.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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