How to Remove File Extension From URLs

Prem Tiwari - - Code Snippets


If you want to remove the file extension from the URLs, then this tutorial designed for you, keep your close attention in the tutorial as I am going to share how to remove the file extension from URLs.

If your site URL is http://example.com/about.php and you want it to be like http://example.com/about, then use the code as suggested below.

How to Remove File Extension from URLs

Open the .htaccess file and copy paste below code at the end of the file. The .htaccess file is located in the root directory of your website. Below code will remove the .php from URLs.


Prem Tiwari

Prem Tiwari is the founder of FreeWebMentor.com and also a professional developer and a blogger by hobby.

Tags: , , , , ,

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.