Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jun 2005
    Posts
    31
    Thanks
    2
    Thanked 0 Times in 0 Posts

    how do I edit .htaccess to allow pages to be viewed without .html exts?

    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?

  • #2
    Regular Coder
    Join Date
    Oct 2004
    Posts
    360
    Thanks
    0
    Thanked 17 Times in 17 Posts
    Put this in your .htaccess file:
    Code:
    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.)

  • #3
    New Coder
    Join Date
    Jun 2005
    Posts
    31
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Someone on another board said to use Options +Multiviews.

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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •