Forum Discussion
SteveEason_3059
Nimbostratus
Feb 22, 2018Adding an exception to an iRule
We have an iRule we are using to remove spaces from URLs, due to some issues we were having. However, I need to adjust the iRule to allow one directory to buy pass the iRule. Here is the iRule:
when HTTP_REQUEST {
set uri [HTTP::uri]
set new_uri [string map {"%20" ""} $uri]
HTTP::uri $new_uri
}
I need it to apply the rule, unless the url starts with ";
How would I add that exception?
Something like this:
when HTTP_REQUEST { if { !([string tolower [HTTP::uri]] starts_with "/files") } { set uri [HTTP::uri] set new_uri [string map {"%20" ""} $uri] HTTP::uri $new_uri } }
- Dan_Bowman
Cirrus
if {not([HTTP::uri] starts_with "/files")} { do stuff }
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