Question
redirecting non www to www domain
I have co.in domain and this added in digital ocean DNS and also virtual hosts configured as below
ServerAdmin webmaster@example.co.in
ServerName example.co.in
ServerAlias www.example.co.in
But non www is not redirecting to www domain.co.in.please let me know why this is not working. but www version is working perfectly.
my .htaccess file also given below
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} !^www\..+$ [NC]
RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
Add a comment
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.
×