Forum Discussion
tidenz_92110
Nimbostratus
Oct 08, 2009switch command questions
Hi Guys,
I am trying to mimic a rule we currently have configured on our web servers.
RewriteCond %{REQUEST_URI} ^/view/.*\.do.*
RewriteCond %{REQUEST_URI} !^/vie...
hoolio
Cirrostratus
Oct 08, 2009Only one switch case will be matched. You can add a default case if you want to catch any non-matches:
switch $some_string {
"case 1" {
case 1 action here
}
"case 2" {
case 2 action here
}
default {
default action here
}
}
If /view/*.do*" will match more generically, you should put it after the other cases. Not equals like logic isn't possible, but again, you can use default to as a catch-all.
You can add logging to the switch cases to verify what's happening.
Aaron
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
