Did you set up a DNS entry for www.subdomain.domain.com? If any sub domains (or in this case sub-sub domains) do not have the proper DNS entry it will point to the panel login because it can not find the sub-sub domain. (www is considered a sub domain believe it or not, that gets directed to point to your domain folder.)
I use this for a non-www to www redirect in my .htaccess (apache 2.4):
So, for www to non-www should be something like this:
In either case, check your php config to ensure mod_rewrite is enabled or it will never work
I use this for a non-www to www redirect in my .htaccess (apache 2.4):
Code:
RewriteEngine On
# Redirect non-www to www
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
So, for www to non-www should be something like this:
Code:
RewriteEngine On
# Redirect www to non-www
RewriteCond %{HTTP_HOST} ^www\.
RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
In either case, check your php config to ensure mod_rewrite is enabled or it will never work