What is the right way to forward the www subdomain (www.domain.com to domain.com). I know these can be set in nginx config files, but i was not sure if octopus writes over these.

To add, I know I can add this to "domain aliases:" and select "Redirect domain aliases to main domain", but I did not want my dev. sudmain to forward as well.

Comments

omega8cc’s picture

Status: Active » Fixed

Aegir doesn't support separate aliases and redirects yet: #815190: Allow for both redirects and aliases

You would need to use this how-to: http://drupalcode.org/project/barracuda.git/blob/HEAD:/docs/HINTS.txt#l16 and add an if with something like:

    ### www. reverse redirect
    if ($host ~* ^(www\.domain-name\.com)) {
        rewrite ^/(.*)$  http://domain-name.com/$1 permanent;
    }
omega8cc’s picture

And for wildcard redirect:

    ### www. redirect
    if ($host ~* ^(www\.)(.+)) {
        set $rawdomain $2;
        rewrite ^/(.*)$  http://$rawdomain/$1 permanent;
    }

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.