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")
redirect to "https:/%h/%u"
Where the A in apply and N in now could be either upper or lower case.
Thanks.
4 Replies
- Colin_Walker_12Historic F5 AccountKphi,
What distribution of the 4.x code are you running on your BigIP? The practices for this vary slightly depending on which release you're on.
Thanks,
-Colin - Kevin_Hickman_1
Nimbostratus
Currently 4.6.2, but we are trying to get to 4.6.4 - Colin_Walker_12Historic F5 AccountKphi,
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 - Kevin_Hickman_1
Nimbostratus
Exactly what I was looking for. Thanks.
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
