Stump of a Muffin

HTACCESS re-direct to WWW Version of Site

.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]

Comments are closed.