I think you're best bet if you want to use a data group would be to put the source host and uri as the name and then the redirect host (& uri) as the value. Then, in your irule you would just use the class command to search the datagroup for the host and uri. Something like this might work. (Note: it will ignore your protocol, so you'd only be checking on
abc.com
instead of
http://abc.com
. Need to be sure you enter the data group items in based on that.)
when HTTP_REQUEST {
set key [string tolower "[HTTP::host][HTTP::uri]"]
if { [class match $key equals DATA_GROUP_NAME] } {
HTTP::respond 302 [class match -value $key equals DATA_GROUP_NAME]
return
}
}