Forum Discussion
Vaughn_96017
Nimbostratus
Jun 27, 2007Redirect based on user browser (mobile)
I am writing an iRule that states if the user is coming in via a mobile device to get redirected to a different pool. My question, here is what I have, is this correct?
when HTTP_REQUEST {
...
Deb_Allen_18
Jul 03, 2007Historic F5 Account
Just answered another post that reminded me of the tcl "return" command.
Instead of setting the flag & conditioning the 2nd switch case on it, you might be able to use "return" @ the end of the first case, with the goal of ending processing for that event immediately, and thus never evaluating the 2nd switch.
However, I've never used "return" inside of switch, so I'm not sure if it would just return you from the switch eval or from the calling event. (I know if you use""return" from inside a loop such as "while" or "foreach" it works as expected, returning from the loop without returning from the calling event.)
Doc for return command is here:
http://tmml.sourceforge.net/doc/tcl/return.html
(Click here)
If you try it, let us know how it worked out for you.
/deb
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
