Forum Discussion

rwagner1's avatar
rwagner1
Icon for Nimbostratus rankNimbostratus
Sep 21, 2018

Multiple domain redirects to subdomain

I have multiple domains on a single VIP using host headers. I would like an irule to redirect sitea.com to , siteb.com to and so on.

 

I think it can be done in a data group and iRule, but when I tested the following it didn't work.

 

Data Group List MULTI-SITE-IRULE sitea.com:= siteb.com:= sitec.com:= sited.com:= sitee.com:=

 

irule when HTTP_REQUEST { if {[set redir_host [class match -value -- [string tolower [HTTP::host]] equals MULTI-SITE-IRULE]] ne "" }{ HTTP::redirect $redir_host }

 

What am I doing wrong?