I'm having some issues with a .htaccess file, RewriteEngine and an Internal Server Error. Everything on this site works fine and the url rewrite is working perfectly. However if I try to access a page that doesn't exist, instead of a 404 I'm getting an internal server error. I have included my .htaccess file below.
# removes all .php extensions
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ /$1.php [L,QSA]
# forces download of file type
AddType application/octet-stream .ies
# Error doc.
ErrorDocument 404 /search.php?var=404
Has anyone encountered this before?