I have a strange problem where google is indexing an unstyled version of my homepage. The URI that results in this problem is my "root host"/index.php/"subpage". So for example www.website.com/index.php/photos would cause this problem.
To rectify this I've created the following Htaccess directive to redirect any permutation of this URL to the homepage:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php [L]
Redirect 301 /index.php^(.*)$ /
The redirect works, however for some reason the first section causes that redirect to be ignored.