Home › Forums › Other › hide .html with .htaccess not working – Please Help › Re: hide .html with .htaccess not working – Please Help
April 25, 2012 at 10:47 pm
#101780
chrisburton
Participant
@NSR
Here is an answer from stackoverflow.com:
RewriteEngine On
RewriteBase /
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*)$ $1.html [NC,L]
If the person tried adding a .html extension to the URL, wouldn’t it automatically be removed with the code above?