I have this in my .htaccess and works fine but I have a subdomain that uses http://subdir.domain.com and domain.com/subdir/ and keeps trying to add .php so when I remove the .php in the rule it works but my SEO URLS do not as well it would not allow me to add a trailing / for my SEO URLS I looked around but nothing worked.

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]