Forum Discussion

1 Reply

  • For that, you'll need to have the 2 VIPs (one for http and one for https), and on the HTTP vip, you could use an iRule like this to force https:

    when HTTP_REQUEST {
        switch -glob [string tolower [HTTP::uri]] {
            "/something/somethingelse*" -
            "/something/anything*" {
                HTTP::redirect "https://[HTTP::host][HTTP::uri]"
            }
            default {
                 Do nothing for the rest of them
            }
        }
    }
    

    Then if you want the opposite for the HTTPS VIP, you can just create a new iRule basically the same except that you redirect in the the

    default
    section instead and do nothing in the matched section of the switch statement.