.htaccess to redirect dynamically to to the www version of the domain if the non-www version is requested: RewriteCond %{HTTP_HOST} ^([a-z-]+)\.([a-z]{2,6})$ [NC] RewriteRule ^(.*)$ http://www.%1\.%2/$1 [R=301,L]
A Resource for Very Little
.htaccess to redirect dynamically to to the www version of the domain if the non-www version is requested: RewriteCond %{HTTP_HOST} ^([a-z-]+)\.([a-z]{2,6})$ [NC] RewriteRule ^(.*)$ http://www.%1\.%2/$1 [R=301,L]