Forum Discussion
Luca_55898
Aug 04, 2011Nimbostratus
redirect 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
Aug 04, 2011Nimbostratus
If 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]"
}
}
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