views:

1174

answers:

1

I am able to set this header

X-UA-Compatible "IE=EmulateIE7"

using the following directive in my Apache 2.0 httpd.conf file:

<Location /mypath>
   Header set X-UA-Compatible "IE=EmulateIE7"
</Location>

How can I configure Apache to only set this header for IE 8 browsers?

+1  A: 

This is the best I could come up with so far. It seems to work. If anyone has a better way, please let me know.

BrowserMatch "^.*MSIE 8.*$" emulate_ie7

<Location /mypath>
   Header set X-UA-Compatible "IE=EmulateIE7" env=emulate_ie7
</Location>
braveterry