[Guide]How to block IE from website

This is a discussion on [Guide]How to block IE from website within the Mu Archives forum part of the Mu Online forum category; Here is 2 ways how to block Internet Explorer from your website or server. make ".htaccess" and put it in ...


Results 1 to 1 of 1

Thread: [Guide]How to block IE from website

  1. #1
    diablo21's Avatar
    diablo21 is offline Addict
    diablo21 is an unknown quantity at this point
    Join Date
    Jul 2008
    Location
    Dimitrovgrad
    Posts
    63
    Downloads
    1
    Uploads
    0
    Rep Power
    2
    Reputation
    7

    [Guide]How to block IE from website

    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:
    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> 
    Second way is with normal index.php:
    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>
    
    Last edited by diablo21; 08-04-2009 at 02:53 PM.
    http://famous-scripters.net/ Join Us now.

Similar Threads

  1. [Guide]How to block country's
    By diablo21 in forum Mu Archives
    Replies: 2
    Last Post: 07-21-2009, 05:49 PM
  2. Memoirs of World of Warcraft
    By Hallowsend in forum WoW Patches
    Replies: 6
    Last Post: 07-12-2009, 06:52 AM
  3. Replies: 7
    Last Post: 04-13-2009, 07:12 AM
  4. [TuT] How to block proxies on a website
    By risker in forum Development
    Replies: 6
    Last Post: 04-03-2009, 08:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Dboyz Interactive Skillhackers