I'm having a bad .htaccess day!I want a user to be able to type the URL mysite.com/aboutinstead of mysite.com/about.htmlOn .htaccess file I have:RewriteEngine OnRewriteCond %{SCRIPT_FILENAME} !-fRewriteCond %{SCRIPT_FILENAME} !-dRewriteRule ^/(.*)$ /$1.html [NC,L]But this simply does not work?I will add though that if i try this further inside the site e.g.mysite.com/pages/contactWorks perfectly whether I have the above code in the .htaccess or notWhat am I doing wrong?
.htaccess - lose the file .html extension
htaccess;mod rewrite
just avoid slashes before both matching patterns and destination.So,RewriteEngine OnRewriteBase /RewriteCond %{SCRIPT_FILENAME} !-fRewriteCond %{SCRIPT_FILENAME} !-dRewriteRule ^(.*)$ $1.html [NC,L]should work perfectly.