the following code is not working to remove the file extension .php
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.+)$ $1.php [L,QSA]
my url not changing from example/about.php
to example.com/about
try this
try this
or
I have found the answer. Its working. the code is as follows to rewrite and redirect the url
It rewrites and redirects the URL. Thanks all for ur answers.
This RewriteRule should remove the
.php
extension from a request. Try placing it before your RewriteConds.