my website link : https://example.com/about.php
Need to change link : https://example.com/about
Tried below code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^about/?$ about.php [L,QSA]
</IfModule>
But not working... Any one please help, Thanks in advance...
Try this code. This is working on my end.
RewriteEngine On
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule !.*\.php$ %{REQUEST_FILENAME}.php [QSA,L]
and make sure you have enabled rewrite_module.
Try this:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]