
Zitat von
Marco Haffner:
XHTML 1.1 liefert man als application/xhtml aus und daran verschluckt *hust* sich der Internet Explorer. XHTML 1.0 kann zur not auch als text/
html ausgeliefert werden.
Es ist application/xhtml+
xml.
Die Lösung: Prüfen ob der Client application/xhtml+
xml unterstützt und wenn ja, als diesen Typ senden:
Für PHP (Ganz am Anfang der Seite):
Code:
<?php
if (strpos($_SERVER["HTTP_ACCEPT"],"application/xhtml+
xml") === false)
{
header("Content-type: text/
html");
} else {
header("Content-type: application/xhtml+
xml");
}
Für statische Seiten (.xhtml) in der .htaccess:
Code:
AddType text/
html .xhtml
DirectoryIndex index.xhtml
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_ACCEPT} application/xhtml\+
xml
RewriteCond %{HTTP_ACCEPT} !application/xhtml\+
xml\s*;\s*q=0
RewriteCond %{REQUEST_URI} \.xhtml$
RewriteCond %{THE_REQUEST} HTTP/1\.1
RewriteRule .* - [T=application/xhtml+
xml]