I want to run my PHP web pages on an apache web server without the .php extension. So I added the following code:
RewriteEngine on
RewriteBase /
Rewritecond %{REQUEST_URI} !(^/?.*\..*$) [NC]
RewriteRule (.*)$ $1.php [NC]
in the .htaccess file. This solves my problem but another problem arises. I cannot view the content of any directory (i.e. the file contained in the drectory). Please provide me an alternate RewriteRule without this problem.