Forum Discussion

Luca_55898's avatar
Icon for Nimbostratus rankNimbostratus
Aug 04, 2011

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?

     if {[HTTP::uri] equals {}} {HTTP::uri {}

11 Replies

  • The easiest way would be to create a virtual server and associate an irule. Below is the configuration I did and getting the page redirect it to HTTP.


    abc_443 ltm virtual abc_443_443 { destination 101.172.31:https ip-protocol tcp mask profiles { http { } tcp-lan-optimized { context serverside } tcp-wan-optimized { context clientside } abc_client { context clientside } } rules { HTTPS_to_HTTP } source translate-address enabled translate-port enabled vs-index 49 }


    ltm rule HTTPS_to_HTTP { when HTTP_REQUEST { HTTP::redirect http://[getfield [HTTP::host] ":" 1][HTTP::uri] } }


    Note: You can ignore the tcp-lan-optimized and tcp-wan-optimized, that was client request and use simple TCP.