I was getting an 'unknown error' when trying to access the admin. I couldn't see anything in the Craft logs apart from 404 related errors.
I replaced the app folder but still no luck, eventually I discovered it was a rewrite rule in my .htaccess causing the problem.
# redirect PHP or HTM to no extension
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^\ ]+)\.(php|htm?)
RewriteRule ^ /%1 [L,R=301]
I'd love to understand why, and how I can get around this in the future?
phpfiles (http://craftcms.stackexchange.com/questions/722/can-we-use-php-in-our-templates-instead-of-twig). Forhtmyou can just rename these tohtmland the extension will be removed automatically if placed in thetemplatedirectory. – Luke Pearce Aug 19 '16 at 14:13