问题
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:
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>
来源:https://stackoverflow.com/questions/831119/how-do-i-set-x-ua-compatible-header-to-ie-emulateie7-for-ie-8-browsers-using-apa