Forum Discussion

Allwin's avatar
Allwin
Icon for Nimbostratus rankNimbostratus
Dec 21, 2020

Server http response to be Redirected to HTTPS

HI,

 

I'm trying to redirect a http response from the backend server to https via iRule, but its not working.

 

Please check if the below iRule is correct.

 

when HTTP_RESPONSE {

if { [TCP::server_port] contains "80"} {

HTTP::redirect "https://www.abcxyz.com/"

}

}

2 Replies

    • Allwin's avatar
      Allwin
      Icon for Nimbostratus rankNimbostratus

      Hi Jai,

       

      I was not sure if the default one would work for a HTTP_RESPONSE.

       

      Does the default redirect work as expected similar to HTTP REQUEST?