Gortguy_105156
Aug 31, 2011Nimbostratus
Strange issue with "matches_regex" and case sensitivity
I'm a relative newbie to iRules, so please don't laugh if this is too simplistic.
I also have two environments, call them primary and test. I use essentially the same rule (copy/paste) for the two; they differ only by the pools they direct traffic to which is determined by the URI.
Here's the rule for the primary site:
when HTTP_REQUEST {
if {[HTTP::uri] matches_regex "/MyURIString" } {
pool alt_pool
} else {
pool main_pool}
}
The rule for the test site:
when HTTP_REQUEST {
if {[HTTP::uri] matches_regex "/MyURIString" } {
pool alttest_pool
} else {
pool maintest_pool}
}
The rule for the primary site works fine, regardless of the case of the URI.
ex: https://mysite.com/MyURIString/page.html = OK
https://mysite.com/MYURISTRING/page.html = OK
https://mysite.com/myuristring/page.html = OK
In the test site, however, the URL is case-sensitive:
ex: https://mytestsite.com/MyURIString/page.html = OK
https://mytestsite.com/myuristring/page.html = broken
Why would one rule require case-sensitivity while the other does not?