Forum Discussion
Moe_Jartin
Cirrus
16 years agoHow 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
16 years agoIt 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
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