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...
Richard_Milner-
May 08, 2012Nimbostratus
That's great, thank you. So I've gotten a bit further, but have a couple of further issues:
when HTTP_REQUEST {
if { !([HTTP::uri] equals "/") or !([HTTP::uri] ends_with ".*") or !([HTTP::uri] equals "/server-status") } {
HTTP::uri [string trimleft [HTTP::uri] /]
log local0. "rule has fired, uri set to [HTTP::uri]"
HTTP::respond 301 Location "/redirect.jsp?code=[HTTP::uri]"
}
}
I can see that the rule has fired when it shouldn't have (I think!)
Rule vanityrewrites : rule has fired, uri set to /assets/images/buttons/english/btn_signup_off.jpg
Surely the statement !([HTTP::uri] ends_with ".*") should have excluded any requests that end with a . followed by a number of characters? Do I need to regex this to something like \.[A-Za-z0-9]{3,4}?
All I really want is "does the URI end in a file name without any parameters"
THanks,
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