Removing .html extension via .htaccess

.htaccess

How do you remove a .html extension or any extension using an .htaccess file?

Best Answer

Google is your friend :-)

Take a look at this article.

Code:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^(.*)$ $1.html

Credit: http://eisabainyo.net/weblog/2007/08/19/removing-file-extension-via-htaccess/