Forum Discussion

Mansi_Chopra_57's avatar
Mansi_Chopra_57
Icon for Nimbostratus rankNimbostratus
Nov 21, 2006

HTTP redirect to HTTPS

Hi,

 

 

Is it possible to redirect an HTTP request to HTTPS.

 

If the customer types the url as http://www..com then the web url should be automatically redirected as https://www..com

 

 

Can it be achieved using iRules?

 

 

Thanks,

 

Mansi

1 Reply

  • A simple HTTP::redirect should do the job

    when HTTP_REQUEST {
      HTTP::redirect "https://[HTTP::host][HTTP::uri]"
    }

    Just make sure you don't have this rule applied to your HTTPS virtual or you will get yourself into an infinite loop.

    BTW, in the future you might want to post iRules questions to the iRules forum. iControl is our remote management API.

    -Joe