Forum Discussion
Joel_Moses
May 08, 2012Nimbostratus
You're looking for parens there instead of square brackets. Like this:
when HTTP_REQUEST {
if { not ( [HTTP::uri] ends_with ".*" ) } {
log local0. "url didn't match .*"
}
}
The iRules interpreter is attempting to execute the URI as a command because that's what it expects after a square bracket - that's why it fails. Parenthesis are how "order" is specified in iRules, curly-braces are how conditionals are separated, and square brackets identify TCL commands to execute.
You've got a little more work to do on your logic, but you're on the right track. Let me know if you need some additional help to get there.