Forum Discussion

MasonJordan_351's avatar
MasonJordan_351
Icon for Nimbostratus rankNimbostratus
Jun 27, 2018

Multiple Domains iRule Redirect to Main Domain

I'm looking to send around 20 domains we have purchased to our one main domain. I understand I can use the below iRule but how do I add these multiple domains into one rule? Can I list them, or does there need to be a statement for each subdomain? This must be a 301 redirect, as 302 is not accepted by my SEO team. I understand that the LTM Policy manager can only redirect as a 301.

 

when HTTP_REQUEST { if { not ([HTTP::host] eq "domain.com") } { HTTP::respond Location 301 https://www.domain.com/ } }

 

1 Reply

  • Hi

     

    I didn't understand your question fully.

     

    To redirect domain, you have to assign this rule to virtual server which mapped with target domain.

     

    or you need create datagroup contains target domain.

     

    regarding subdomain, I need more information.

     

    If you provide example it would be helpful to answer.

     

    have a good day bro.