Forum Discussion
Elias_O_16228
Nimbostratus
Dec 26, 2012irule to redirect https and ports
I have http redirect to https working fine. It is working fine and dandy as expected but the problem is that the users have to specify ports since the http is not default port. For instance, http://1...
Elias_O_16228
Nimbostratus
Dec 27, 2012If VS service port is 80 http, the redirect won't work. If it's 8989 other the redirect works.
Below is the redirect irule:
when HTTP_REQUEST {
Check if the client used an SSL cipher
if {not ([catch {SSL::cipher version} result]) && [string tolower $result] ne "none"}{
Client did use a cipher
log local0. "\$result: $result. Allowing encrypted request."
} else {
Client did not use a cipher
log local0. "\$result: $result. Redirecting unencrypted request. [HTTP::host][HTTP::uri]"
HTTP::respond 302 Location "https://[HTTP::host][HTTP::uri]"
}
}
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