httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <jos...@slive.ca>
Subject Re: [users@httpd] Auto selection by MIME type
Date Sun, 17 Aug 2003 23:47:07 GMT

On Mon, 18 Aug 2003, Robert Andersson wrote:

> Clive Miller wrote:
> > I've searched through the directives, and checked FAQs, but can't find
> > any way to select a file according to requested MIME-TYPE.
>
> The client does not request a MIME type, since it doesn't know what MIME
> type a certain resource has.
>
> What you want (or perhaps meant in the first place) is to select contents
> based on the client request's Accept: header. This is what Content
> Negotiation does:
> http://httpd.apache.org/docs/content-negotiation.html

Yes, exactly.

But one other alternative is available if you don't want to use full-blown
content negotiation.  You can use mod_rewrite to peek into the Accept
header and select content based on what it sees.  This is a little less
elegant the using mod_negotiation, but it sometimes allows tighter
control.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message