How to remove file extension from URL in PHP ?

How to remove file extension from URL in PHP ?

How to remove file extension from URL

It is very important to secure your site. you can hide or change or remove file extension from URL in  your PHP project. You must enable your mod_rewrite of Apache’s miraculous. a very simple and effective method of htaccess is RewriteRule, by RewriteRule yo can simply change or remove file extension from URL.
Use below code put it in your htaccess file your extension will be removed.  There are so many PHP methods that can secure your site, it is one of them .

you can use htaccess file , to remove file extension .

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php

Please share your useful code and questions we will surely answer each question related PHP. Please comment your suggestion and changes for above code. please check How to find duplicate record from mysql database ?