How do I eliminate the .html from the end of a URL?

html, redirect, url

Solution

The simplest way would be to create a directory called `sample` and put the html file renamed to index.html inside of it.

If you don't want to mess around with directories you will need something like mod_rewrite. Just googled a beginners tutorial for you: http://www.sitepoint.com/guide-url-rewriting/

Problem

I have a website, `www.example.com`. On it, I have a HTML page, accessible by URL `www.example.com/sample.html`. I want to just type in `www.example.com/sample` and have the browser take me to the page located at `www.example.com/sample.html`. How do I do this? Do I need to set up some sort of redirect?

Original source