Is there an easy way (preferably with htaccess and mod_rewrite) to force the browser to always access a site with the www. prefix (adding it automatically where necessary?)
Thx.
Is there an easy way (preferably with htaccess and mod_rewrite) to force the browser to always access a site with the www. prefix (adding it automatically where necessary?)
Thx.
Rewritecond %{HTTP_HOST} !www.domain.com
RewriteRule ^/(.*)$ http://www.domain.com/$1 [R=301]
or maybe
RewriteCond %{HTTP_HOST} !^www.
RewriteRule ^/(.*)$ http://www.%{HTTP_HOST}/$1 [R=301]