How to remove .html from url?

Lets say if I for example have an url on my website like http://example.com/page.html

Hot can I remove the .html from it so it's only http://example.com/page

4 Answers

Relevance
  • Anonymous
    8 years ago
    Favorite Answer

    The easiest method is using folders. Instead of using page.html you would create a folder named page and the html inside the folder would be named index.

    Sounds more complex than it actually is but instead of having pages you would have folders each containing index.html

    The relative linking of internal pages is slightly more complicated since instead of linking page to page-one as <a href="page-one">...</a> you would now have to include ../ since both pages or more correctly folders are one level beneath the root directory and it would become <a href="../page-one/">...</a>

    Not essential to work correctly but it is a good idea to include the trailing / since it required one less server request but this is also the case for page.html/

    Hope this helps. Jim

  • Justin
    Lv 6
    8 years ago

    single click the file

    hit F2

    hi the "End" key

    hit the backspace button 5 times.

    hit enter

  • Anonymous
    8 years ago

    You need to configure whichever Server software you are using to host the site. If you are using a third party host rather than hosting it yourself then ordinarily you won't have access to that feature unless your web host has an interface to let you set it.

    Apache is one of the most common server software packages distributed usually as WAMP for Windows and LAMP for Linux. This article [1] will show you how to hide page extensions in Apache

  • 8 years ago

    Use backspace or delete keys on your keyboard.

Still have questions? Get your answers by asking now.