Forum Discussion

wwalla_99196's avatar
wwalla_99196
Icon for Nimbostratus rankNimbostratus
Jul 14, 2009

generic ssl redirect from http

Could someone post the iRule:

 

 

ssl to http redirect so that when users go to http://www.mysite.com it redirects them to https://www.mysite.com

 

 

Many thanks!!

5 Replies

  • Hi,

     

     

    The codeshare has a few examples:

     

     

    http://devcentral.f5.com/Wiki/default.aspx/iRules.CodeShare

     

     

    HTTPToHTTPSRedirect_301 - Redirects all traffic to same hostname, same URI over https by issuing a redirect with status 301 (Moved Permanently).

     

    HTTPToHTTPSRedirect_302 - Redirects all traffic to same hostname, same URI over https by issuing a redirect with status 302 (Moved Temporarily).

     

     

    Aaron
  • This is my error:

     

    01070151:3: Rule [httpTOhttps] error:

     

    line 1: [ltm_rule_L7 feature not licensed] [when HTTP_REQUEST {

     

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

     

    }]

     

    line 2: [ltm_rule_L7 feature not licensed] [HTTP::respond 301 Location "https://[getfield [HTTP::host] : 1][HTTP::uri]"]

     

    line 2: [ltm_rule_L7 feature not licensed] [HTTP::host]

     

    line 2: [ltm_rule_L7 feature not licensed] [HTTP::uri]

     

    Can you help with that?

     

    3.7.1

     

    F5 LTM/LC
  • If you have a link controller without the LTM license, you won't be able to use layer 7 (HTTP) iRules. You could contact your F5 account rep to see what your options are for getting a license.

     

     

    Aaron