kmtmt_51646
Nov 19, 2012Nimbostratus
How to extra strings inside "class match"
Hi Dev members,
Let me ask about "class match" function.
Here's my Data Group:
============
ltm data-group internal /Common/testgroup1 {
records {
/test { }
}
type string
}
ltm data-group internal /Common/testgroup2 {
records {
/test/ { }
}
type string
}
============
and my iRule
============
when HTTP_REQUEST {
if { [class match -- [HTTP::uri] equals testgroup1] || [class match -- [HTTP::uri] starts_with testgroup2] }{
pool pool-true
} else
pool pool-false
}
============
1)
I need to deted following Paths by iRules with Data Group and send to pool-true:
a) http://www.example.com/test
b) http://www.example.com/test/index.html
c) http://www.example.com/directory/test/index.html
d) http://www.example.com/testing/index.html
my iRule works fine but I need to have 2 Data Groups and tough to maintain both, so I wonder if can add "/" after DataGroup somehow inside iRule.
For example:
============
when HTTP_REQUEST {
if { [class match -- [HTTP::uri] equals testgroup1] || [class match -- [HTTP::uri] starts_with "testgroup1/"] }{
pool pool-true
============
Does anyone have ideas?
Thank you very much,
kmtmt