Forum Discussion
falooda_281506
Nimbostratus
Feb 22, 2017iRULE difference between strong tolower
What is the difference between both iRule usuage, and when is best to use this:
elseif {[HTTP::uri] contains "/testweb/" {pool TESTweb}
elseif {[string tolower [HTTP::uri]] contains "/testw...
Kai_Wilke
MVP
Feb 22, 2017Hi falooda,
the
[string tolower [HTTP::uri]] syntax is the recommended approach, if a human is intended to type the URL into the address bar. In addition, this command is also recommended if you implement certain security controls (e.g. blacklists) and you want to make sure that a different /CaSE can not be used to bypass the policy...
The user/attacker may enter:
https://www.domain.de/shorturl
https://www.domain.de/Shorturl
https://www.domain.de/ShortUrl
https://www.domain.de/SHORTURL
Your first iRule snippet will trigger only on the first example. And your second iRule snippet will trigger in any of the above URL examples.
Cheers, Kai
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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