Problems with XHTML content type.
My answer to Problems with XHTML content type. on Ask MetaFilter
The first question you should be asking is why you need XHTML—if you don’t have a specific reason (the need for XML parsers to be able to consume your pages) you’re much better off with HTML 4.01 for now, and HTML 5 in probably a year or so.
As for serving up XHTML, you need to check the browser’s HTTP_ACCEPT header to decide whether or not to serve it (IE, including IE 7, can’t handle it at all and will offer to download it).
Then at 15:07:
Forgot to mention: the best reason to use XHTML is if you want to embed SVG or MathML in your pages. Again, that trick won’t work in any existing version of Internet Explorer.
Generally though it’s best avoided. I served my personal site in XHTML with the correct content type for several years; it was a nuisance. The XML error model is fundamentally unsuited to the Web.
One of the reasons HTML 5 is so interesting is that it attempts to specify an error model that is as close as possible to the way actual browsers work today.