Forum Discussion

f5now_28704's avatar
f5now_28704
Icon for Nimbostratus rankNimbostratus
Oct 03, 2007

URI and case sensitive

Hi all,

 

 

I just made a rule for to redirects and it works 100%. but Im not sure if I can make it so its not case sensitive? so it would also answer for /Desktop or /DeskTop

 

 

when HTTP_REQUEST {

 

if { [HTTP::uri] eq "/desktop" } {

 

HTTP::redirect "http://www.google.com/Solutions/Desktop/tabid/122/Default.aspx"

 

}

 

if { [HTTP::uri] eq "/trial" } {

 

HTTP::redirect "http://www.google.com/Trial/tabid/121/Default.aspx"

 

}

 

}

 

 

thanks for any help.
  • Yah I had see that "string tolower" command but wasnt clear on its total use. I thought it was for moving from all upper case to lower case or at least that was the examples I had see posted.

     

     

    anyways thanks again

     

    Ryan
  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    It is for moving everything to lowercase.

     

     

    By changing the string you're inspecting completely to lowercase before the comparison is made, you can ensure that case has no relevance in your comparison. Does that make sense? :D

     

     

    Colin
  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    No sweat, glad I could help. Let us know if you've got any more questions.

     

     

    Colin