Mobile app version of vmapp.org
Login or Join
Bryan171

: .htaccess - lose the file .html extension I'm having a bad .htaccess day! I want a user to be able to type the URL mysite.com/about instead of mysite.com/about.html On .htaccess

@Bryan171

Posted in: #Htaccess #ModRewrite

I'm having a bad .htaccess day!

I want a user to be able to type the URL


mysite.com/about


instead of


mysite.com/about.html


On .htaccess file I have:

RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^/(.*)$ /.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/contact


Works perfectly whether I have the above code in the .htaccess or not

What am I doing wrong?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Bryan171

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme