Remove PHP extension from URL using HTACCESS

Go to the website root and open the .htaccess file in the notepad or similar editor. If you can't find the file then create one. Now add the following code to the htaccess file and save.

Remove PHP extension from URL

#php remove extension from url
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME}\.php -f 
RewriteRule ^(.*)$ $1.php

Rewrite .php to no extension

#rewrite .php to no extension
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]

I do not use cookies on this website

🍪🍪 What cookies?

Your privacy is important. That's why this website doesn't track visitors with fingerprinting, your IP address or cookies.

Web analytics data is your own. Reclaim it.

Gain back control with a privacy-focused web analytics platform (using a cookie-less architecture) from: Data Centurion.