.htaccess tutorial : Removing .php extension

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:

Noew go to that url without .php and you will see your page there. Nice!

Do you like this post? Consider a donation 😀

Published by


Habibie is an Indonesian freelance frontend-backend web programmer and cross platform mobile app developer. He's also good at graphics design, video editing, visual effects and animation.

Leave a Reply

Your email address will not be published. Required fields are marked *