the following htaccess rule will redirect files without extension (contact) to (contact.php) but it also run on folders
I want it to run only on files only and skip running on folders
RewriteEngine on
RewriteBase /
Options +MultiViews
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
</IfModule>
RewriteCond %{REQUEST_FILENAME} !-f !-dRewriteCond %{REQUEST_FILENAME} !-fand nextRewriteCond %{REQUEST_FILENAME} !-d