Forum Discussion
2 Replies
Sort By
I would prefer the second one. The tolower command will convert all characters in HTTP:uri to lowercase characters before it is compared to '/testweb/'. This will cause variations like '/tEstWeb/' to also match.
Hi falooda,
the
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...[string tolower [HTTP::uri]]
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