Forum Discussion
Brent_Sachnoff_
Nimbostratus
Oct 23, 2007Using switch with uri
I'm having some issues using the switch command and uri's. I believe the switch command is only for EQUALS to something for it to work properly which means this wouldn't work at all. Here is a sample...
Oct 31, 2007
If you just put "/search/*" in the case for the switch, it will only hit the first part of the string as you don't have any wildcards before the first slash. But, if you used "*/search/*" it would hit both (at least I think a beginning wildcard will match on nothing...)
As for your mention of "2 hits", I'm not sure what you mean by that. The case comparison in the switch statement is a boolean operation (does it match the pattern or not). So, 1, 2 or 50 matches all will result in the containing code being executed once.
-Joe
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