I’d like to redirect the: aegir-server.com/a-site-url.com to a-site-url.com without hacking Aegir and based on a pattern so any future site will follow this type of redirect. Is it possible through Aegir?

(Aegir redirects the : aegir-server.com/node/site_id/goto_site to the site, but this is not what I need)

1 Answer 1


The easiest way would be to edit the .htaccess file of your hostmaster platform and add something like

RewriteRule ^(.*\.com) http://$1 [L,R=301]

Note that you have to reload apache as Aegir integrates the htaccess file into the vhost config.

  • Many thanks for the answer. I was looking for a more 'Drupal/Aegir' way, but probably I'll use the .htaccess as it's the million tested solution.
    – tvl
    Jul 9, 2014 at 10:03
  • 1
    The .htaccess of the hostmaster platform may get lost when upgrading Aegir (ex: Debian packages). You could also use github.com/mlutfy/provision_customhtaccess (but you would have to restrict it to only the Hostmaster platform, especially if you do not fully trust users on that system, since they could inject bad things in the vhost).
    – bgm
    Oct 22, 2014 at 22:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.