string tolower help

I have an irule working as such -

when HTTP_REQUEST {

set host_used [HTTP::host]

set uri_used [HTTP::uri]

if { [HTTP::uri] starts_with “/Common/HomeAddress/ABCdef” } {

log local0. “[IP::client_addr] sent request $host_used $uri_used”

}

}

When i try using the “string tolower” it errors out.. what am i doing wrong?

when HTTP_REQUEST {

set host_used [HTTP::host]

set uri_used [HTTP::uri]

if { [string tolower [HTTP::uri]] starts_with “/Common/HomeAddress/ABCdef” } {

log local0. “[IP::client_addr] sent request $host_used $uri_used”

}

}

Hi,

You’ll want to put the URI you’re checking into lowercase as well to get a match:

if { [string tolower [HTTP::uri]] starts_with “/common/homeaddress/abcdef” } {

Aaron

DUH!!! thanks Aaron.