How to block internet explorer access?

3

How can I block my site from being accessed by the iternet explorer via .htaccess? I already tried codes like:

RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} "MSIE [6-8]" [NC]
RewriteRule ^(.*)$ http://mysite.com/ie [R=301,L]

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} *MSIE*
RewriteRule ^index\.html$ http://example.com/ie/ [L]
RewriteRule  ^/$ http://example.com/index.html [L]
</IfModule>

But it did not work, does anyone know any other code that works?

    
asked by anonymous 28.07.2015 / 14:08

1 answer

0

Use this way:

RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} "MSIE [6-8]" [NC]
RewriteRule ^(.*)$ http://mysite.com/ie [R=301,L]

It will redirect to link , where you can post some message informing the user. It leaves only that part, in the part "MSIE [6-8]" is the version of IE.

    
28.07.2015 / 14:17