Forum Discussion
Neil_66348
Nimbostratus
Apr 30, 2010iRules - URI's with "FullStops" in
Hi guys ,
Hope someone can help here .
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::path]] {
"*/dev.inbound.prod.Portal*" {
pool Prod-HTTP-POOL
}
"*/dev-pool*" {
pool DEV-HTTP-POOL
}
default {
pool LIVE-HTTP
}
}
}
The above is a variation of our usual rule for content directing , the problem with the above is that it appears any uri's which have a "fullstop" in dont' work.
So */dev-pool* works fine , but /dev.inbound.prod.Portal* doesn't , if we change "." to be "-" this works.
Unfortunatley the website we wish to apply this to, we cannot change....
Any ideas greatly recieved.
Many Thanks
Neil
- Hamish
Cirrocumulus
Good question... A '.' char isn't special according to the glob docs on tcl.tk, so in theory it should work. What happens is you - hoolio
Cirrostratus
That's really odd. switch -glob should use the same logic as 'string match'. I don't think the period has any significance as a wildcard for string matching:when RULE_INIT { log local0. "[string match "a.b.c." "a.b.c."]" log local0. "[string match "a.b.c." "aabbcc"]" switch -glob "a.b.c." { "a.b.c." { log local0. "matched a.b.c." } "aabbcc" { log local0. "matched aabbcc" } default { log local0. "no match" } } }
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