Evaluating data pulled from a data group
I am building an iRule that will redirect specific traffic. I have several different URL paths (uri_search_string) that I need to set this up for and would like to pull that from a data group along with the product specific information needed in the iRule. I get an error stating that a boolean is expected. I want it to execute or evaluate the code that is pulled from the data group. Is that possible?
data_group
product := product1
uri_search_string := ([string tolower [HTTP::uri]] equals "/xyz" || [string tolower [HTTP::uri]] contains "/abc/123") and not ([string tolower [HTTP::query]] contains "a1=y" || [string tolower [HTTP::query]] contains "a2=y")
iRule
set project [class match -value project equals data_group]
set uri_search_string [class match -value uri_search_string equals data_group]
if { $uri_search_string } {
do redirect and other stuff here
}
else {
do other stuff here
}