View Full Version : how do I edit .htaccess to allow pages to be viewed without .html exts?

08-02-2006, 12:28 PM
My old webhost had this enabled by default, instead of going to http://mysite.com/page1.html, you could type in http://mysite.com/page1 and it would still work.

Someone told me how to do this by adding a couple of lines to your .htaccess file but I forgot what it was and I can't seem to pull it up on Google.

Anyone know?

08-02-2006, 01:32 PM
Put this in your .htaccess file:

DefaultType test/html
DirectoryIndex index index.html index.htm
Then rename all you HTML files without the .html extension. (Test it works first with one file.)

08-02-2006, 05:54 PM
Someone on another board said to use Options +Multiviews.

Seems to work and doesn't require me to rename files.