Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am not able to find and way to set some header in .htaccess file only if the browser is IE9. Pseudo code for my requirement is:

if(ie 9) {
 header set ( value2)  
} else {
      header set ( value2)
}

Please suggest me how i can achieve this in my htaccess file.

share|improve this question

1 Answer 1

You could use BrowserMatch directive from mod_setenvif to set Apache environment variable and use this variable to set appropriate header value using mod_headers.

BrowserMatch "MSIE 9" MSIE9FOUND
Header set YourHeader value2 env=MSIE9FOUND
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.