Forum Discussion
Moe_Jartin
Cirrus
Jan 22, 2010How to match just / uri????
I have the following irule:
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
/services* {
pool pool_beta-dev.blah.org_SERVICES
}
...
hoolio
Cirrostratus
Jan 25, 2010It should work with a single escaping backslash:
when RULE_INIT {
set slash_string /\?param=value
log local0. "$slash_string: $slash_string"
switch -glob $slash_string {
/\?* { log local0. "matched 1" }
default { log local0. "no match" }
}
}
: $slash_string: /?param=value
: matched 1
Also, you could replace HTTP::uri with HTTP::path and then use "/" as the switch case.
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