Redirect root domain to www Subdomain and vice versa
How can I redirect with DirectAdmin root domains (domain.com) to the subdomain (www.domain.com) permanently?
In Apache httpd.conf you have to add this lines to the virtual host:
RewriteEngine on
Rewritecond %{HTTP_HOST} !^www\.<domain>\.com
RewriteRule (.*) https://www.<domain>.com/$1 [R=301,L]
Is possible to do it with DirectAdmin panel? Can I writte the lines directily in httpd-vhosts.conf or some where?
Thank you.
How can I redirect with DirectAdmin root domains (domain.com) to the subdomain (www.domain.com) permanently?
In Apache httpd.conf you have to add this lines to the virtual host:
RewriteEngine on
Rewritecond %{HTTP_HOST} !^www\.<domain>\.com
RewriteRule (.*) https://www.<domain>.com/$1 [R=301,L]
Is possible to do it with DirectAdmin panel? Can I writte the lines directily in httpd-vhosts.conf or some where?
Thank you.