Forum Discussion
Yozzer
Jun 03, 2011Nimbostratus
Data Group List use in a switch
Hi
I have a Data Group list called allowed_urls that has a list of accepted urls which i want to use in an irule.
switch -glob [HTTP::uri] {
"*temp.txt" {
do...
hooleylist
Jun 09, 2011Cirrostratus
The datagroup is always defined outside the iRule. You cannot define a datagroup within an iRule.
Which LTM version are you running? The class command was added in 10.0.0. If you're on v9.4.4, you can use this instead:
when HTTP_REQUEST {
if {[matchclass [string tolower [HTTP::path]] equals allowed_urls]}
do stuff
}
}
For pre-9.4.4 add a $:: prefix to the datagroup name reference in the iRule.
Aaron
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