HTTP to HTTPS Redirect (Simple I-Rule)

Brand new to I-Rules and I was hoping someone could help me with creating a simple I-Rule for redirecting traffic from an HTTP VIP to an HTTPS VIP. FYI - I am terminating the SSL Cert on the LB for HTTPS.

Use the existing irule ’

_sys_https_redirect

’ That is for http to https redirect only and add this to http VIP.

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

-Jinshu

Hi!

There is a default iRule for HTTP to HTTPS redirection. Just add in on the HTTP VS.