Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Answers

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/ } }

0
Rate this Question

Answers to this Question

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

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.

0