Forum Discussion
Chris_Olson
Nimbostratus
Sep 12, 2006Evaulating http::uri against a string
I would like take the value of http::uri and compare it to a text value but I want to take the case of http::uri out of the comparison. I'm attempting to use the string tolower function, but it's not working for me (I'm new to this language). Here is an example of what I'm trying to do.
if { [ string tolower $HTTP::uri] equals "/app1/qsenhancedlogin.asp" } {
HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri]
If the user enters "www.mycompany.com/app1/qsenhancedlogin.asp" then it properly redirects to https. If the user enters "www.mycompany.com/app1/QSEhnancedlogin.asp" however it doesn't work.
Can someone help me out?
2 Replies
- Deb_Allen_18Historic F5 AccountTry this syntax instead:
if {[string tolower [HTTP::uri]] equals "/app1/qsenhancedlogin.asp"}{
- Chris_Olson
Nimbostratus
That did the trick! Thanks a million.
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