Forum Discussion
Robert_47833
Altostratus
Nov 14, 2011how to use switch to match datagroup
1:there is a datagroup:cjj
how to use switch to match this group
switch -glob [HTTP::path] {
"cjj" xxxx ???
2:
switch -glob [HTTP::path] { "*jpg" - "*bmp" - ...
Robert_47833
Altostratus
Nov 14, 2011Hi,Aaron
sorry for making any confusion here
they are 2 different questions
1:I want to know whether datagroup can be applied in switch synatx
2:I 'd like to know in wich case I should use variable
like set path [HTTP::path]
switch -glob $path { "*jpg" - "*bmp" - "*gif" - "*png" - "*img" - "*ico" - "*js" - "*css" - "*swf" - "*swz" - "*vbs" - "*html" - "*htm" - "*csv" - "*txt" - "*crossdomain.xml" {pool xyz}
or switch -glob [HTTP::path] { "*jpg" - "*bmp" - "*gif" - "*png" - "*img" - "*ico" - "*js" - "*css" - "*swf" - "*swz" - "*vbs" - "*html" - "*htm" - "*csv" - "*txt" - "*crossdomain.xml" {pool xyz}
I have read one link to ask me to use variable if we need to evaluate it repetitively
http://devcentral.f5.com/Tutorials/TechTips/tabid/63/articleType/ArticleView/articleId/281/Ten-Steps-to-iRules-Optimization.aspx
6- Use Variables
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