There may be different ways to handle the data that Apache returns, and there are two equivalent ways of implementing this functionality. The multiviews method is simpler (and more limited) than the *.var method, so we shall start with it. The Config file (from ... /site.multiview) looks like this:
User webuser Group webgroup ServerName www.butterthlies.com DocumentRoot /usr/www/site.multiview/htdocs ScriptAlias /cgi-bin /usr/www/cgi-bin AddLanguage it .it AddLanguage en .en AddLanguage ko .ko LanguagePriority it en ko <Directory /usr/www/site.multiview/htdocs> Options + MultiViews </Directory>
For historical reasons, you have to say:
even though you might reasonably think that Options All would cover the case. The general idea is that whenever you want to offer variants on a file (e.g., JPG, GIF, or bitmap for images, or different languages for text), multiviews will handle it.
Image negotiation is a special corner of general content negotiation because the Web has a problem with image files: for instance, some browsers can cope with PNG files and some can't, and the latter have to be sent the simpler, more old-fashioned, and bulkier GIF files. The client's browser sends a message to the server telling it which image files it accepts:
HTTP_ACCEPT=image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
The server then looks for an appropriate file and returns it. We can demonstrate the effect by editing ...