Mar 27, 2026 - For details about updated CVE-2025-53521 (BIG-IP APM vulnerability), refer to K000156741.

Forum Discussion

Allan_66523's avatar
Allan_66523
Icon for Nimbostratus rankNimbostratus
Oct 31, 2011

Requests to http changed to https

I am looking to add an Irule to a certain VIP of ours that change HTTP requests to HTTPS.

 

 

Thanks,

 

3 Replies

  • The one we use, which I think is pretty standard, looks like this:

     

     

    when HTTP_REQUEST {

     

     

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

     

     

    }
  • just in case you would like to use built-in feature.

     

     

    sol7125: Configuring a virtual server to automatically redirect HTTP requests to HTTPS

     

    http://support.f5.com/kb/en-us/solutions/public/7000/100/sol7125.html
  • Arie's avatar
    Arie
    Icon for Altostratus rankAltostratus
    Instead of HTTP::redirect (which generates a 302 - Temporary Redirect) you may want to consider:

     

     

    HTTP::respond 301 Location "https://[HTTP::host][HTTP:uri]"

     

     

     

    That way the client will cache the redirect and save you a few cycles.

     

     

     

    Also, keep in mind that you can issue only one HTTP::respond/HTTP::redirect; you'll encounter a nasty "connection reset" if multiple respond/redirects are issued.