XML.com: XML From the Inside Out

XML.comWebServices.XML.comO'Reilly Networkoreilly.com
  Articles | Weblogs | Newsletter | Safari Bookshelf
advertisement

Article:
 The Road to XHTML 2.0: MIME Types
Subject: Why use mod_rewrite?
Date: 2006-06-12 06:12:20
From: BryanK

Apache 2 (and HTTP in general) has another perfectly-suited mechanism for changing the Content-Type header, though. Apache will take all the Accept: headers sent by the client, choose an alternative from all the options listed in the document.html.var file in the directory, and serve that to the client. Look into mod_negotiate, not mod_rewrite. (But note that at least IE6/Win's Accept: header has */* listed with no priority, whereas at least Firefox has */* listed at a much lower priority. So your .var file has to give text/html a 1.0 preference, and application/xhtml+xml a 0.99 preference or so.)


Yes, it is one more round-trip (I think), but I haven't seen too many problems with it, even on a slow upstream connection (web server on ADSL).


Previous Message Previous Message   Next Message Next Message

Sponsored By:


Contact Us | Our Mission | Privacy Policy | Advertise With Us | | Submissions Guidelines
Copyright © 2008 O'Reilly Media, Inc. | (707) 827-7000 / (800) 998-9938