Forum Discussion
Richard_Milner-
May 08, 2012Nimbostratus
mod_rewrite to iRule conversion question from a newcomer
Hi Folks,
I'm fairly new to the BIGIP devices, though I've used competitors products before so I'm not starting from scratch. I have a mod_rewrite rule that I'm trying to migrate f...
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.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects