Forum Discussion

scarnes_82101's avatar
scarnes_82101
Icon for Nimbostratus rankNimbostratus
Jan 03, 2013

irule to allow only certain uris

I'm trying to create an simple iRule that will allow only uris that are in the data group "allowed uris". My iRule is:

 

when HTTP_REQUEST {

 

if {[matchclass [HTTP::uri] equals "allowed_uris "]}

 

{forward}

 

else

 

{discard}

 

}

 

and the data group is defined as:

 

class allowed_uris {

 

"/site1/*"

 

"/site2/*"

 

"/site3/*"

 

}

 

 

When the iRule is enabled, it seems to discard all http requests. Is my data group syntax wrong or is there something wrong that I'm not seeing in our iRule?

 

 

7 Replies