Forum Discussion

kashif_shahzad's avatar
kashif_shahzad
Icon for Nimbostratus rankNimbostratus
Nov 25, 2022

HTTPS to HTTP

hi,

i have a situation where i have to redirect incoming traffic on https to http as the old applications does not support https yet.

i have tried to create 2 VS one http and one https and tried to use en IRULE to redirect traffic to http under https VS. but it fails with " The provided URI scheme 'https' is invalid; expected 'http'. (Parameter 'via') " message.

i have tried it with policy also by forwarding traffic to http VS but still same message.

irule that i tried was as under. tried with redirect also.

when HTTP_REQUEST {
HTTP::respond 301 Location "http://[HTTP::host][HTTP::uri]"

has anybody been in this kind of situation and managed to get things working....?

  • Hi kashif_shahzad , 
    > Create a https virtual servers and do not assign any pool to it. 
    > use this iRule inside the Https virtual server. 

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

    > Create another Http (port 80) virtual server and assign the required pool to it.

    > Browse your https://url , and track your redirection. 
    it works with me 
    Look at these snap shots : 

     

    Regards 

  • Hi kashif_shahzad , 
    > Create a https virtual servers and do not assign any pool to it. 
    > use this iRule inside the Https virtual server. 

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

    > Create another Http (port 80) virtual server and assign the required pool to it.

    > Browse your https://url , and track your redirection. 
    it works with me 
    Look at these snap shots : 

     

    Regards