Forum Discussion
Robert_47833
Jun 03, 2011Altostratus
switch -glob to match two or more than two conditions
Hi,I wanna to achieve this ,use switch -glob instead of if/else chain
if { [[TCP::local_port clientside] != 443] && [[HTTP::uri] starts_with "/mobile/auth"] }
{
HTTP::redirect "h...
Colin_Walker_12
Jun 06, 2011Historic F5 Account
Aaron's point is a good one. The switch command, while efficient and wonderful (I'm a fan, what can I say?) does have limitations. When trying to compare multiple pieces of information you're going to be nesting switches quickly and that can get messy. Ifs can be better in these cases if you're dealing with small numbers of matches (like one).
Colin
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