drupaldrupal-7drupal-rules

Drupal redirect when domain is not a particular version


I have example.com -> example-example.rhcloud.com (301 redirect) and michael.example.com -> example-example.rhcloud.com as a CNAME record.

Godaddy doesn't allow for CNAME root domains and I didn't want to use cloudflare at this point.

Is there a way to build a rule in drupal that when the URL access is example-example.rhcloud.com to redirect to michael.example.com?

I know probably I can build an internal 301 rule using Rules module but I wonder if there is similar functionality with the domains module.


Solution

  • I managed to achieve this with Rules module.

    enter image description here

    For the record I solved the solution partially with rules and also assigned a forwarding 301 from tsikerdekis.com to www.tsikerdekis.com

    Then assigned cnames for subdomains like www and others that I used. The rule itself only covers a 301 redirect from the rhcloud domain to the websites official domain.