Forum Discussion

Kunal18oct1's avatar
Kunal18oct1
Icon for Nimbostratus rankNimbostratus
May 04, 2020

Need an IRULE for HTTP and HTTPS listener on same server

I am trying to create a one Virtual server which can listen on http and https , on http it needs to redirect the request to https.

 

On https VS I want to do ssl bridging, I believe I need an irule for this.

 

when CLIENT_ACCEPTED { 

  set https 0 

 } 

 when CLIENTSSL_HANDSHAKE { 

  set https 1 

 } 

 when HTTP_REQUEST { 

  if {not ($https)}{ 

    HTTP::redirect https://[HTTP::host][HTTP::uri] 

  } 

else {

SSL::profile clientssl_profile

SSL::profile serverssl_profile

pool $Poolname

}

 }

 

Can this irule work ? if not what changes I need here.

3 Replies