auto remove php extension using htaccess

Solutions on MaxInterview for auto remove php extension using htaccess by the best coders in the world

showing results for - "auto remove php extension using htaccess"
Helena
18 Aug 2018
1#This code will automatically remove .php extention
2#ex: it remmoves www.eample.com/xyz.php to www.example.com/xyz
3RewriteEngine on
4RewriteBase /
5RewriteRule ^(.+)\.php$ /$1 [R,L]
6RewriteCond %{REQUEST_FILENAME}.php -f
7RewriteRule ^(.*?)/?$ /$1.php [NC,END]
8
9#Copy and paste the above code in .htaccess file