Forum Discussion
jrok_47156
Nimbostratus
Aug 30, 2012HTTP::uri equality question
This may be a very simple question but I have looked for a few hours now and cannot find a good answer.
Why does this work?
switch [HTTP::uri] {
"/maintenance" { ...
jrok_47156
Nimbostratus
Aug 30, 2012Hey thanks Michael.
I had re-purposed an older more complicated iRule for a new site and removed the switch and just made it an if. It took awhile to figure out what was causing the connection error but it was the if. If I put back the switch it works perfectly. We also thought the == might be the problem so we tried equals too.
Should this work?
if { [HTTP::uri] equals "/maintenance" }
We can certainly use the switch with only a single comparison but it seems like the if should work too.
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