Forum Discussion
Matt_Breedlove_
Aug 08, 2011Nimbostratus
assistance with literal question mark in switch
Hi All,
In this switch, it allows through a few URI prefixes with a wildcard, but then there is a URI that is like this
/?g
or like this
/?w
any single character following the literal ...
Michael_Yates
Aug 08, 2011Nimbostratus
I tinkered with this again and got these working as expected.
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/foo*" { HTTP::redirect "http://www.yahoo.com" }
"/\\?\\?*" { HTTP::redirect "http://www.msn.com" }
"/\\?*" { HTTP::redirect "http://www.google.com" }
}
}
Hope this helps!
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