htaccess rewrite causes 500 error instead of 404
问题 I've recently added this little bit of code to my .htaccess file: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ $1.php [L,QSA] Ok, I understand what's happening here, I think. This little bit of code to remove PHP file extensions causes a loop if the document is not found. This loop causes a 500 server error instead of the (proper) 404. Unfortunately I have very little understanding of what these rewrites are actually doing, so I don't know how to