Forum Discussion

Colin_Christy_1's avatar
Colin_Christy_1
Icon for Nimbostratus rankNimbostratus
Sep 16, 2005

iRules Syntax Issue

So we have an iRules and it is not working the way we expected. Is there something off in the syntax?

 

 

Thanks.

 

 

when HTTP_REQUEST {

 

if { [[HTTP::uri] contains c_virus_discards] }{

 

discard

 

} elseif { [HTTP::uri] contains "cfide" }{

 

discard

 

} elseif { [matchclass [HTTP::uri] ends_with $::images] }{

 

pool p_netcache

 

} elseif { [HTTP::host] equals "www.argentmortgage.com" }{

 

pool p_argentmortgage

 

} else [HTTP::redirect "https://[HTTP::host][HTTP::uri]" ]

 

}
  • iControl is our Management API. You might try posting this over in the iRules v9.x forum. Also, in your post, you might want to post what you are expecting to happen and what is happening to help us diagnose what is wrong.

     

     

    Another useful tip is to use the log statement to save debugging info into the log file. This way you can find out where in the rule your logic is breaking.

     

     

    -Joe