views:

271

answers:

2

Firefox requires xhtml extension for mathml but IE will not display pages with xhtml extension (it displays a download dialog box instead).

I have tried apache content negotiation like so:

RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} .*MSIE.*
RewriteRule \.xhtml$ - [T=text/html]

but IE seems only to care about the extension. I have tried this on my local server where mod_rewrite is installed.

A: 
David Dorward
+2  A: 

It seems that this works:

<ifmodule mod_rewrite.c>
RewriteEngine On

RewriteCond %{HTTP_USER_AGENT} !.*MSIE.*
RewriteRule \.html$ - [T=application/xhtml+xml]

RewriteCond %{HTTP_USER_AGENT} .*MSIE.*
RewriteRule \.html$ - [T=text/html]
</ifmodule>

If it weren't for internet explorer, I'd know so much less about all sorts of things!

Alex
You also wouldn't *need* to know those things because you'd be happily working on your website. ;)
musicfreak