httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Hartill <hart...@ooo.lanl.gov>
Subject Re: Content Negotiation
Date Mon, 06 Mar 1995 08:52:10 GMT
> 
> However, I see that if you had a directory containing .gif and .jpeg versions
> of many images, it would be tedious to have to create a .shtml map file for
> every image. So how about a default wildcard mapping set in the .htaccess
> file in the directory? That way, the server would read a per-directory list
> of extensions to stat for, rather than having to try everying the browser
> accepts.
> 

The script and hack I've got for 1.3 does something very similar to
this. A global MIME type can be set so that any file ending with
a particular extension can be checked for negotiation, e.g.
one could set an extension .img which when requested would be
intercepted by httpd and passed to my cgi-script, the script then
looks for a conversion table by that name, if it doesn't find one
it looks for a table in that directory, then in the document root.

When (if) it finds a table it looks to see how the type should be
processed. For gif/jpeg, this could be a local redirect to one or
the other file formats. The table can also specify commands to be
executed, response codes to be returned, and probably a few other
useful alternatives I've forgotten already.

See  http://ooo.lanl.gov/explain.html    for some old info.


rob h


Mime
View raw message