Irule Datagroup redirect
I have following URLs that need to be redirected using Datagroup and irule but i can't figure out the irule or data set
https://www.abc.ca/marrow/Overview > https://test.abc.ca/stashtest
https://www.abc.ca/marrow/Sponsors > https://xyz.ca.ca/stashbwards/list
https://www.abc.ca/marrow/Sponsors?N=105098 > https://xyz.ca.ca/stashbwards/list?stash_bward_filter=boucher
https://www.abc.ca/marrow/Sponsors?N=105099 > https://xyz.ca.ca/stashrewards/list?stash_bward_filter=in-store
https://www.abc.ca/marrow/SponsorsDetails?Nr=vendor.id:100218 > https://xyz.ca.ca/stashrbwards/touterer/88991
https://www.abc.ca/marrow/SponsorsDetails?Nr=vendor.id:100245 > https://xyz.ca.ca/stashrbwards/boucher/89021
https://www.abc.ca/marrow/BewardsProductList?a=true&selectedCategoryId=cat70001 > https://xyz.ca/merks
I have tried something like
datagroup name= test1
key= /marrow/Overview value=test.abc.ca/stashtest
or
key=www.abc.ca/marrow/Overview and value=test.abc.ca/stashtest
with following irule
when HTTP_REQUEST {
if { [class match [HTTP::host][HTTP::uri] equals test1] }
{set redirect_value [class match -value [HTTP::host][HTTP::uri] eq test1]
HTTP::respond 301 Location
HTTP::redirect "http://$redirect_value"
}
}
But it does not seem to work. I am using Big-IP 11.6