Forum Discussion
gasch_297596
Nov 01, 2016Nimbostratus
HTTP to HTTPS redirect over the same port
Hello,
i hope you can help me. I need an http to https redirect to the same port. For example I enter the URL http://dev.intern.com:25001 and I want to get redirected to https://dev.intern.com:2...
gasch_297596
Nov 02, 2016Nimbostratus
Hello,
we found the solution for the Problem. A few years ago a person had the same problem:
https://devcentral.f5.com/questions/http-to-https-redirect-on-non-standard-port
So you just have to use the iRule:
when CLIENT_ACCEPTED {
set https 0
}
when CLIENTSSL_HANDSHAKE {
set https 1
}
when HTTP_REQUEST {
if {not ($https)}{
HTTP::redirect https://[HTTP::host][HTTP::uri]
}
}
And to activate non-SSL in your SSL Profile under Local Traffic -> Profiles -> SSL -> Client -> (Profile you are using)
After that you are able to set the iRule on your SSL virtual server.
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