Forum Discussion
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
- swjo_264656
Cirrostratus
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.
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com