Forum Discussion

Joe_Pena's avatar
Joe_Pena
Icon for Nimbostratus rankNimbostratus
Oct 24, 2018

exception list for non-ssl URI paths

How and where do I build the exception list for this script?

 

when HTTP_REQUEST { if { [class match [HTTP::path] starts_with exception_URI_list] } { return } HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri] }

 

1 Reply

  • This iRule:

    when HTTP_REQUEST { 
        if { [class match [HTTP::path] starts_with exception_URI_list] } { 
            return 
        } 
        HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri] 
    }
    

    is looking for a string-type data group called "exception_URI_list". Data groups are easily created in the LTM UI under Local Traffic - iRules - Data Group List. Create a new data group using the defined name, select "String" as the Type, and then start adding your path entries as the String values. It doesn't look like you need the corresponding Value, so you can leave this blank.

    An [HTTP::path] is the string value after the domain and before any query strings, so for example, "/foo", "/bar", "/blah".