Forum Discussion
AngryCat_52750
Nimbostratus
Nov 16, 2012string 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"
}
}
2 Replies
- hoolio
Cirrostratus
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 - AngryCat_52750
Nimbostratus
DUH!!! thanks Aaron.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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