If you have a page with .php extension and you don’t want to show that extension in page’s url in address bar, you will need an .htaccess file.
For example, if you have a page with this url: http://mypage.com/coolpage.php and you want it to be: http://mypage.com/coolpage without .php in it, you can create an .htaccess file in your page’s directory on the server and put below codes in it:
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule !.*\.php$ %{REQUEST_FILENAME}.php [QSA,L]
Noew go to that url without .php and you will see your page there. Nice!