Forum Discussion
http to https redirect on single VIP using a port list consisting of port 80 and 443
- Sep 16, 2020
Do you have Non-SSL Connections enabled in your clientSSL profile?
Excellent. Jason!
I did not know that was an option. With Non-SSL Connections enabled in the client SSL profile I do not need to disable the SSL for port 80 requests anymore under "when CLIENT_ACCEPTED". This leaves me free to process the irule using only "when HTTP_REQUEST". I had to tweak the irule slightly from my original post, but the below works a charm 👍
when HTTP_REQUEST {
if { [TCP::local_port] == 80 } {
if {[HTTP::has_responded]}{return}
HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri]
event disable
}
}
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