This is an archive of an inactive wiki and cannot be modified.

Serving XHTML with Apache

This technique gives a possible implementation for the CategoryBpContentFormatSupport using Apache.

Apache attaches a given media type to a resource based on the extension of the relevant file; for instance, by default, Apache is configured to serve file with a .html extension as text/html.

XHTML Basic is not supposed to be served as text/html (see XHTML Media Types ) and is best served as application/xhtml+xml, which allows user agents to use it as an XML language. The extensions associated by default with this media type are ".xhtml" and ".xht", so writing your content in files ending with that names should be enough to serve them properly.

NB: A well-known issue with this media type is that it is not supported by Internet Explorer; you may want to serve your content under the two content types.

Back to BestPracticesList

CategoryStatic CategoryXhtml

Contributions to this wiki are governed by the W3C policies for Contribution to W3C' wiki on Mobile Web.