Forum Discussion
Luca_55898
Nimbostratus
Aug 04, 2011redirect HTTPS to HTTP
So this is backwards from most requests, but i need to redirect anything that comes to a site on HTTPS to HTTP.
Will this do it?
when HTTP_REQUEST {
if {[HTTP::uri] equals {https://www....
Michael_Yates
Nimbostratus
Aug 04, 2011If you use the same iRules for both HTTP and HTTPS traffic you could include something like this. It would not touch the HTTP Traffic, but would flip and redirect the HTTPS Traffic based upon the incoming TCP Port.
when HTTP_REQUEST {
if { [TCP::local_port] == 443 } {
HTTP::redirect "http://[getfield [HTTP::host] ":" 1 ][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
