Request for mod_negotiation, AllowOverride Options

D9R

Verified User
Joined
Oct 28, 2003
Messages
34
Location
Atlanta
content negotiation, Apache 1.3 vs 2.0

Regarding 'content negotiation' and Apache 1.3 vs 2.0:

Am I asking too much to want to use content negotiation on my sites? I've used it for about 6 years on shared hosting plans; but for whatever reason the module isn't on the newer version of Apache 2.0. Is that because it presents a security risk? Should I give up using content negotiation, and start adding '.php' to my links? (*It may sound like a trivial feature, but once you try it you'll like it - see below.*)

In summary, I'm wondering why content negotiation isn't supported anymore, and if it's too exotic a feature for me to continue using.

** about content negotiation
````````````````````````````
Cool URIs don't change
What makes a cool URI?
A cool URI is one which does not change.
What sorts of URI change?
URIs don't change: people change them.

What to leave out: Everything!

* File name extension.
This is a very common one. "cgi", even ".html" is something which will change. You may not be using HTML for that page in 20 years time, but you might want today's links to it to still be valid. The canonical way of making links to the W3C site doesn't use the extension.

How can I remove the file extensions...
...from my URIs in a practical file-based web server?

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 (e.g. 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
 
Back
Top