non-www redirection

Found a reply:

http://help.directadmin.com/item.php?id=2

And change the templates however you need.

Eg: change:

ServerName www.|DOMAIN|
ServerAlias www.|DOMAIN| |DOMAIN| |SERVER_ALIASES|
to:

ServerName www.|DOMAIN|
ServerAlias |SERVER_ALIASES|
Then at the end of the virtual_hosts.conf file, add a 2nd virtualhost for just |DOMAIN| to handle your redirect.

<VirtualHost |IP|:80>
ServerName |DOMAIN|
Redirect permanent / http://www.|DOMAIN|/
User |USER|
Group |GROUP|
</VirtualHost>
 
Back
Top