Forum Discussion
Brian_Kenworthy
Nimbostratus
Oct 03, 2006Inspect URI without Case Senstivity?
Hello all,
I have created the following rule to redirect traffic based on the URI to another pool, however, I want the rule to ignore case sensitvity within the URI string. Here is my rule:...
Oct 03, 2006
matches_regex is way overkill for a simple string comparison. Regular expressions are very CPU intensive so it's better to not use them if you don't have to.
As for the case sensitivity, you can use the TCL "string tolower" command in your comparison. I'd go with something like this:
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] starts_with "/_xml/ors/status.asp" }{
pool mypool_B2B_SSL
} else {
pool mypool.com_SSL
}
}
Hope this helps...
-Joe
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