Here is 2 ways how to block Internet Explorer from your website or server.
make ".htaccess" and put it in your website folder.
Enter thise code inside it:
Second way is with normal index.php:Code:<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{HTTP_USER_AGENT} MSIE RewriteCond %{REQUEST_FILENAME} !ban_ie.php RewriteRule .* /ban_ie.php [L] RewriteCond %{HTTP_USER_AGENT} MSIE RewriteCond %{REQUEST_FILENAME} !ban_ie.php RewriteRule .* /ban_ie.php [L] </IfModule>
Code:<?php ob_start(); ?> <html> <head> <style type="text/css"> * { margin:0; padding:0; height:100%; } #mydiv { position:absolute; width:400px; height:90px; text-align:center; top:50%; left:50%; margin-top:-40px; margin-left:-200px; border:solid 2px red; padding-top:30px; background:#ffff00; font-weight:bold; } </style> </head> <body> <div id="mydiv"> <?php $browser = $_SERVER['HTTP_USER_AGENT']; if(strstr($browser, "MSIE")) { echo"BG: Свалете си Mozilla Firefox за да влезнете в сайта EN: Download Mozilla Firefox to enter website <br /> <b><a href='http://www.mozilla.com/en-US/firefox/'>Mozilla Firefox</a></b>"; } elseif (strstr($browser, "Opera")) { echo"Свалете си мозилла <br /> <b><a href='http://www.mozilla.com/en-US/firefox/'>Mozilla Firefox</a></b>"; } else { header("Location: http://muonline-bg.eu/"); } ?> </div> </body> </html>


LinkBack URL
About LinkBacks
