How do I construct my .htaccess file so that it adds www to the beginning of the address mysite.com, but doesn’t add www. to the beginning of other subdomains such as test.mysite.com? My .htaccess file currently looks like this:
Options -Multiviews
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ $1.php
Something like:
Instead of