How to Remove File Extension From URLs

By: Prem Tiwari | Last Updated: | In: 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 and you want it to be like, 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.

About: Prem Tiwari

Prem Tiwari is the founder of and also a professional developer who has vast experience in PHP and open source technologies. Apart from this, he is a blogger by hobby and also he has been a regular speaker of WordPress sessions in various IT Companies.

You may also like:

Tags: , , , , ,