Forum Discussion
Mike_S_59924
Nimbostratus
Apr 14, 2008comparison other than equals
Looks like irules only support equals and not equals. Is there any way to simulate greater than and less than.
The problem.
We have a web site w/ 240 virtual directories. We want...
Apr 17, 2008
The error is that you have an opening brace before the switch argument (before the string tolower command). Remove that and the error should go away.
One more thing, if you use the glob option on switch, you can eliminate the string allocations that are caused by the string range and tolower commands.
This should be equivalent, but likely a bit more optimal.
hen HTTP_REQUEST {
Parse the fist character in the path
switch -glob [HTTP::path] {
"/[a-cA-C]*" {
pool test1
}
"/[d-lD-L]*" {
pool test2
}
"/[m-rM-R]*" {
pool test3
}
"/[s-zS-Z]*" {
pool test4
}
default {
Requested URI was a leading forward slash only
pool test5
}
}
}
Hope this helps...
-Joe
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