Apache: How to set your domain to redirect to WWW by default
Add the below to your .htaccess file in order to have your-domain redirect to www.your-domain. Just make sure where it says “your-domain.com” to fill in your domain on both lines 2 and 3. RewriteEngine on RewriteCond %{HTTP_HOST} !^www.you-domain.com$ RewriteRule ^(.*)$ http://www.your-domain.com/$1 [R=301] Why would you do this? It makes your […]