Forum Discussion
Jim_Couch_16225
Nimbostratus
Sep 25, 2018Http > Https redirect with a modification to the URL.
I tried using the default http > https url redirect on an application yesterday but when I would redirect, the application would break. Turns out, there is code built into the application that speci...
Leonardo_Souza
Cirrocumulus
Sep 25, 2018The system iRule "_sys_https_redirect" should do that for you.
It uses "HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri]".
From the documentation:
https://devcentral.f5.com/wiki/irules.getfield.ashx
To extract only the hostname from the host header (strips any trailing ":" port specification)
when HTTP_REQUEST {
set hostname [getfield [HTTP::host] ":" 1]
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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