Forum Discussion

Chris_Olson's avatar
Chris_Olson
Icon for Nimbostratus rankNimbostratus
Sep 12, 2006

Evaulating 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?