This is my .htacess in this I able to remove .php extension but it is not working as per expected output (eg. https://localhost/shap/example.php to https://localhost/shap/example) it is working for index.php but it is working for other .php page, it is been stuck in redirection please help me get resolve this issue
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
# Return 404 if original request is .php
# RewriteCond %{THE_REQUEST} "^[^ ]* .*?\.php[? ].*$"
# RewriteRule .* - [L,R=404]
RewriteRule ^index\.php$ https://localhost/shap/ [NC,R]
RewriteRule ^example\.php$ https://localhost/shap/example[R]
</IfModule>
