I am sure I have goofed up somewhere in my configs. So this is what is happening.
My document root does not have any folder called "2". Yet, if I access, for example,
http://www.mostpopularsports.net/2/poll.php
or even some totally crazy url like:
http://www.mostpopularsports.net/2/poll.php/dsadsdsdsdsdsads
apache is serving content from
http://www.mostpopularsports.net/2.php (but, the image paths etc are all wrong as can be seen).
This has caused serious trouble as Google has indexed some crazy non-existent urls due to this problem (most likely it crawled when I might be changing something .. argh.. never develop live).
This is my .htaccess in the document root:
Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^mostpopularsports.net [nc]
rewriterule ^(.*)$ http://www.mostpopularsports.net/$1 [r=301,nc]
Options -Indexes
And this is the apache virtual host config file inside sites-enabled:
<VirtualHost *:80>
ServerAdmin ".........@mostpopularsports.net"
ServerName mostpopularsports.net
ServerAlias www.mostpopularsports.net
CustomLog /var/log/apache2/mostpopularsports.net_access_log "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\""
ErrorLog /var/log/apache2/mostpopularsports.net_error_log
DocumentRoot "/var/www/domains/mostpopularsports.net"
<Directory "/var/www/domains/mostpopularsports.net">
Options +FollowSymLinks +MultiViews
Options -Indexes
Order allow,deny
Allow from all
AllowOverride All
</Directory>
</VirtualHost>
I am stumped :(