Question
Help, can anyone show me a very concrete way to redirect a non-www to www..some say change .htacess & mydomain.com.conf alias
so far i have this (nothing happens)
RewriteEngine on
RewriteCond %{HTTPHOST} !^www.
RewriteCond %{HTTPS}s on(s)|offs()
RewriteRule ^ http%1://www.%{HTTPHOST}%{REQUEST_URI} [NE,L,R=301]
ServerAdmin admin@mydomain.com
ServerName mydomain.com
ServerAlias www.mydomain.com
DocumentRoot /var/www/mydomain.com
i read and tried everything i saw in the net but of no avail.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×