Forum Discussion

chris_connell_1's avatar
chris_connell_1
Icon for Nimbostratus rankNimbostratus
Jan 27, 2009

irule not working

 

HI could someone tell me why this irule does not work?

 

I want to bypass the request

 

 

http://www.pistonheads.com/sales

 

 

www.pistonheads.com is in the bypass_url_datagroup

 

 

when HTTP_REQUEST {

 

if {[matchclass [HTTP::host] contains ::bypass_url_datagroup] && ([HTTP::uri] contains "/sales")} {

 

forward}

 

}

 

 

Thanks

 

 

It did work when I just had and tried www.pistonheads.com

 

 

when HTTP_REQUEST {

 

if {[matchclass [HTTP::host] contains ::bypass_url_datagroup]} {

 

forward}

 

}

 

 

 

Is there some way I can test irules ? i.e. an irule tested?

 

THanks

 

2 Replies

  • What type of VIP are you testing this iRule on? Can you post an anonimized copy of the VIP using 'b virtual VIP_NAME list'?

     

     

    If the second version is working, the first version should as well.

     

     

    Thanks,

     

    Aaron
  • Deb_Allen_18's avatar
    Deb_Allen_18
    Historic F5 Account
    Might be case sensitivity...

    In any case, best practice is to eliminate wherever it might be a factor, like this:
     
     if {[matchclass [string tolower [HTTP::host]] contains ::bypass_url_datagroup] \\ 
       && [string tolower [HTTP::uri]] contains "/sales"} { 

    /d