I am having a problem with redirecting a page from example.com (to) http://www.example.com
The code I have is:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^subdomain\.domain\.com$ [NC]
RewriteRule ^(.*)$ http://www.subdomain.domain.com/$1 [L,R=301]
And it is not working, any help?
All you need to do is force the www version of your domain? Just do this…