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...
Yozzer
Jun 09, 2011Nimbostratus
Hi Aaron
Colins example doesnt compile:
line 3: [undefined procedure: class] [class match -value [string tolower [HTTP::path]] equals blocked_list]
line 4: [missing a script after "if"] []
line 7: [command is not valid in the current scope] [}]
I don't want to define the list in the code but in the Data Group List tab (in the GUI under Local Traffic >> iRules >> Data Group List). Is this why its not updating?
Looking a again at Colins example, i want the same action to be performed for all strings in the Data Group List so i dont need to define the action until its found that the any of the strings in the list are in the url.
when HTTP_REQUEST {
set action [class match -value [string tolower [HTTP::path]] equals Portal_blocker_list]
if {$action ne ""}
do stuff
else set value "found"
}
}
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