URL redirect with Data Group
I am trying to use data groups to redirect URL, however the data group value is just appending to the end of the original URL in the web browser. Same result in Chrome, IE, and Firefox. I am not sure what I am doing wrong.
iRule: when HTTP_REQUEST { if { [class match -name [HTTP::host][HTTP::uri] equals datagroup_redirects] ne ""} { HTTP::redirect [class match -value [HTTP::host][HTTP::uri] equals datagroup_redirects] } }
Data Group: "www.test1.com/stuff/" := "www.site1.com/morestuff/", "www.test2.com/stuff/" := "www.site2.com/morestuff/", "www.test3.com/stuff/" := "www.site3.com/morestuff/", "www.test4.com/stuff/" := "www.site4.com/morestuff/", "www.test5.com/stuff/" := "www.site5.com/morestuff/", "www.test6.com/stuff/" := "www.site6.com/morestuff/"
When I put www.test1.com/stuff/ in the web browser I just end up with www.test1.com/stuff/www.site1.com/morestuff/ instead of just www.site1.com/morestuff/
Any ideas where I went wrong?