issue: misoncifgured dns?
symptom: when i visit http://www.borisnikolaev.com/index.php?option=com_content&view=article&id=51&Itemid=53
, it shows what should be on http://www.floridaseating.com/index.php?option=com_content&view=article&id=51&Itemid=53
if i remove the 'www' subdomain, it works as usual.
this occurs for several of the other domains on this server, and when using any subdomain, except those in the dns zone file (excluding www).
the reason i noticed this is because google had indexed several of the pages under the wrong domain name.
primary domain dns configuration: https://i.stack.imgur.com/1HooV.png
secondary domain dns configuration: https://i.stack.imgur.com/fAQV8.png
any help is appreciated!
i have a dv server with mediatmeple, which has apache 2.2, and plesk 10.4. i have switched off the dns management in plesk, as i don't resell hosting, and manage that through mediatemple's account center page.
FOUND SOLUTION, thanks to direction by @cjc
Following should work. Add to vhost.conf
file typically found in /var/www/vhosts/domain.com/conf
ServerAlias *.domain.com
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.* [NC]
RewriteCond %{HTTP_HOST} ^([^\.]+)\.domain\.com
RewriteCond /var/www/vhosts/domain.com/httpdocs/%1 -d
RewriteRule ^(.*) /%1/$1 [L]