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" - "*gif" - "*png" - "*img" - "*ico" - "*js" - "*css" - "*swf" - "*swz" - "*vbs" - "*html" - "*htm" - "*csv" - "*txt" - "*crossdomain.xml" {pool xyz}
in this case,should I create a variable uri to replace [HTTP::path] to make the irule more efficent?
- nitass
Employee
1 - Robert_47833
Altostratus
Hi,nitass - nitass
Employee
http://devcentral.f5.com/Tutorials/TechTips/tabid/63/articleType/ArticleView/articleId/281/Ten-Steps-to-iRules-Optimization.aspx - Robert_47833
Altostratus
1:it seems datagroup can't be used in switch - hoolio
Cirrostratus
Jucao, - Robert_47833
Altostratus
Hi,Aaron - Michael_Yates
Nimbostratus
Hi jucao,when HTTP_REQUEST { if { [class match [string tolower [HTTP::uri]] ends_with image_types ] } { pool image_server_pool } else { pool content_server_pool } }
- hoolio
Cirrostratus
1: I want to know whether datagroup can be applied in switch syntax - Robert_47833
Altostratus
oh,I got u - Robert_47833
Altostratus
hmm,I should use variable if one command run more than 1 time,right?
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