Content negotiation with mod_negotiation

Negotiation with a type-map file

Which one did you get?

Used code (inside text.var):

URI: text

URI: text.txt
Content-Type: text/plain

URI: text.html
Content-Type: text/html

URI: text.xhtml
Content-Type: application/xhtml+xml

With Multiviews

Got the same file again? In my opinion this is a handier technique.

Used code (in .htaccess):

Options +MultiViews


An image

You can get a bmp, png, tiff, jpg or gif. Take your pick :-). You probably prefer png. Very pointless.

This is the image your browser prefers

Used code (in .htaccess):

Options +MultiViews


Different languages

Which language does your browser think you speak?

Used code (in .htaccess):

Options +MultiViews


Combined

I'll probably add this one as well.. Or not :)


Internet Explorer

Internet Explorer sends */* as the Accept header, which breaks content negotiations for that browser.


Home - More stuff