Forum Discussion
Kevin_Hickman_1
Nimbostratus
Aug 08, 2005Mixed case compares ?
What is the best syntax to compare uri's in a mixed case environment.
I want to use something along the lines of:
if (http_uri starts_with "/cccard/public/en/ApplyNow")
redi...
Colin_Walker_12
Aug 08, 2005Historic F5 Account
Kphi,
To do this in the 4.6.1 and later branch, you'd use the "tolower" command, which we made available as of 4.6.1.
We have a solution about it on askf5.com here:Click here http://tech.f5.com/home/bigip/solutions/lb/sol2796.html
Basically, the syntax looks like this:
rule WhateverCase {
if (tolower(http_uri) ends_with "jpg") {
use pool web
} else {
use pool web1
}
}
Whenever performing a string comparison while using the tolower command, it will treat everything as lowercase, so you should be set.
Hope this helps,
-Colin
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