?While the aliases textarea and redirects checkbox are displayed on the Create Site form, it is not obvious how to get there later, when the site already exists.
To be able to redirect foo.com to www.foo.com you need to use www.foo.com as a main domain name for the site created in Aegir and enable standard redirect. It will add foo.com as an alias automatically.
If your site is already created with foo.com, you can’t rename it directly to www.foo.com, however. It is because www.foo.com alias is already “taken” so it is a classic chicken/egg syndrome.
You will need to rename the site to anything.foo.com first and then back to www.foo.com, plus enable redirect.
Now any visit to foo.com will cause 301 redirect to www.foo.com
Note that there is no .htaccess in Aegir and Nginx, so you can’t manage redirects in .htaccess file. You need to use Aegir interface to manage your Nginx web server configuration.
How to redirect foo.com to www.foo.com
To be able to redirect foo.com to www.foo.com you need to use www.foo.com as a main domain name for the site created in Aegir and enable standard redirect. It will add foo.com as an alias automatically.
If your site is already created with foo.com, you can’t rename it directly to www.foo.com, however. It is because www.foo.com alias is already “taken” so it is a classic chicken/egg syndrome.
You will need to rename the site to anything.foo.com first and then back to www.foo.com, plus enable redirect.
Now any visit to foo.com will cause 301 redirect to www.foo.com
Note that there is no .htaccess in Aegir and Nginx, so you can’t manage redirects in .htaccess file. You need to use Aegir interface to manage your Nginx web server configuration.
Ask Question