Forum Discussion
TMcGov_92811
Nimbostratus
Mar 03, 2009case insensitivity in 4.x IRule
My 9.4 iRule is as such and works great:
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] contains "myone/rf"} {
pool http-services.abc.com-zuma
}
else {
pool http-services.abc.com-unix
}
}
How do I update the 4.x iRule below to also be case sensitive ? It is a valid 4.x iRule without the case insensitivity....
if (http_uri matches_regex "CCCOne/RF") {
use pool services-zuma
}
else {
use pool services-unix
}
- hoolio
Cirrostratus
In 4.6 or so, the tolower function was added. If you are on 4.6+ you can use that. Else, you can use matches_regex and add both the upper and lowercase versions of each letter. You can check this post for examples (Click here)
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