Menu

File extensions can be removed by editing .htaccess file.

What is .htaccess and how to create it ?

.htaccess is a file that can be created by any text editor like notepad++ etc.
.htaccess is a configuration file for web servers and can be used to alter configuration such as redirection ,error handling ,block users by IP etc.
Create this file and place it in root folder of your website.This will take effect over entire directory and sub directories it is placed in.

Remove File Extension such as .html and .php

		
	RewriteEngine On
	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteRule ^([^\.]+)$ $1.html [NC,L]
	RewriteRule ^([^\.]+)$ $1.php [NC,L]
	
Give correct permission to this file i.e. 755 / executable and thats it.
If still it does not work contact your web hosting and check with them.

References :-

How To Remove File Extensions

Htaccess Guide

Support us by sharing our content :-

LinkedIn

Support us on Patreon :-
Become Patron