IfModule except for Internet Explorer

Problems with the Windows version of XAMPP, questions, comments, and anything related.

IfModule except for Internet Explorer

Postby genamiga » 16. March 2019 14:56

Hello,

I added this to my .htaccess file :


Code: Select all
# deactivate MIME-Type sniffing
<IfModule mod_headers.c>
Header always set X-Content-Type-Options "nosniff"
</IfModule>



It works well with Chrome, Mozilla, Opera ... but not with Internet Explorer

How to exclude Internet Explorer?

Thank you in advance.
genamiga
 
Posts: 2
Joined: 16. March 2019 14:36
Operating System: Windows 10

Re: IfModule except for Internet Explorer

Postby gsmith » 16. March 2019 19:58

Code: Select all
# deactivate MIME-Type sniffing
<IfModule mod_headers.c>
    <If "%{HTTP_USER_AGENT} !~ /(Trident|MSIE)/">
        Header always set X-Content-Type-Options "nosniff"
    </If>
</IfModule>
gsmith
 
Posts: 266
Joined: 29. November 2013 18:04
Location: San Diego
XAMPP version: 0.0.0
Operating System: Win 10/2012R VS 14,15,16

Re: IfModule except for Internet Explorer

Postby genamiga » 17. March 2019 20:22

Works great, thanks a lot.
genamiga
 
Posts: 2
Joined: 16. March 2019 14:36
Operating System: Windows 10


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 88 guests