On my site, say example.com
, if I try to access test.example.com
, Firefox automatically adds www
. to test.example.com
, making it www.test.example.com
, which causes an error. However, if I visit a site like my.ebay.com
, no www.
is added so no error occurs. What's going on?
Just in case, my .htaccess file is as follows:
Options -Multiviews
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example.com
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ $1.php
I looked through Firebug and it seems like Firefox doesn't even make an attempt to reach test.example.com
before reverting to www.test.example.com
.
One nuance I didn't realize until now. If I try to access the site using test.example.com/
, the www.
is added. If however that trailing slash is not there, then I am sent to the sub domain properly.