Forum Discussion
Michael_Yates
Nov 01, 2011Nimbostratus
Hi nacejj,
Here is a simple example of value retrieval from a Data Group if it helps. I used "class match" instead of "findclass".
Data Group:
class redirect_datagroup {
{
"/bar" { "http://www.msn.com" }
"/foo" { "http://www.google.com" }
"/foobar" { "http://www.yahoo.com" }
}
}
iRule:
when HTTP_REQUEST {
if { [class match [string tolower [HTTP::uri]] contains redirect_datagroup] } {
HTTP::redirect [class match -value [HTTP::uri] equals redirect_datagroup]
}
}
Hope this helps.