Forum Discussion
Mark_Porter_979
Nimbostratus
Oct 12, 2005Percent character encoding and irules
I have an irule that looks at the request_uri to determine which pool to use:
if (http_uri matches_regex "/[Vv][Ee][Nn][Dd][Oo][Rr]_[Mm][Gg][Tt]") {
use pool lm-pmweb-2k3
}
...
Martin_Machacek
Oct 14, 2005Historic F5 Account
Mark,
if you are running BIG-IP 4.6.x or newer, you can use following rule:
rule match_vendor_mgt {
if(tolower(decode_uri(http_uri)) == "/vendor_mgt")
use pool lm-pmweb-2k3
} else {
use pool lm-web-prod
}
}The decode_uri function translates %XX escape following rules defined in RFC2396. The tolower function translates ASCII uppercase characters to their lowercase equivalents. The above rule should be more efficient than regex matching.
BIG-IP versions older than 4.6 do not support the tolower function.
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
