Forum Discussion

aspindler34_133's avatar
aspindler34_133
Icon for Nimbostratus rankNimbostratus
Nov 22, 2013
Solved

80 and 443 redirection

what is the simplest "best practice" way, via an irule, to redirect users from 80 to 443 after ssl offload performed on an LTM?

 

  • Apply this iRule to a VIP that is listening on port 80.

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

3 Replies

  • Apply this iRule to a VIP that is listening on port 80.

    when HTTP_REQUEST {
                 HTTP::redirect "https://[HTTP::host][HTTP::uri]"
            }
    
  • You actually don't even have to do that. Every LTM comes with a built-in HTTP-to-HTTPS redirect iRule called _sys_redirect (or something like that).

     

  • Not sure what version of LTM you're running, but if we're talking about _sys_http_redirect, it most certainly does retain the URI.