How to remove File Extension in URL

Sometimes we need to remove the File Extension in our URL like .php and .html for a different reason. For me my reason to remove is for security reasons.

to do that go in your htaccess file and open it on your favorite text editor. mine is sublime text

in this case will now be