I'd like to be able to refer to to URL's on my web site without using file name extensions. e.g.-So that people connect to a page on my site using an url such as www.mydomain.com/coolpage instead of www.mydomain.com/coolpage.html. Does anyone know how I can configure an .htaccess file or files to allow this?
Dreamhost tech support said that it can be done through .htaccess files. However, they noted that they did not have the exact code to do this.
According to the article below, "Cool URIs don't change" by Tim Berners-Lee, this can be done through "content negotiation."
Here's an excerpt from that article:
"If you are using, for example, Apache, you can set it up to do content negotiation. You keep the file extension (such as .png) on the file (eg mydog.png), but refer to the web resource without it. Apache then checks the directory for all files with that name and any extension, and it can also pick the best one out of a set (e.g. GIF and PNG). (You do not have to put different types of file in different directories, in fact the content negotiation won't work if you do.)
- Set up your server to do content negotiation
- Make references always to the URI without the extension
References which do have the extension on will still work but will not allow your server to select the best of currently available and future formats."
I know much about server configuration, Apache, .htaccess files, ect. so the Apache's docs on content negotiation I found at apache.org where as clear as mud to me. Moreover, I couldn't find anything which specifically described how to do what the "Cool URIs don't change" advocated.