0
Welcome Guest! Login
0 items Join Now

How to keep ie6 users out?

    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    How to keep ie6 users out?

    Posted 16 years 5 months ago
    • I know its not nice, but sometimes I woluld just like to ...
      KEEP THEM OUT!
      So whats the best way to redirect ie6 (an below) to a "You won't get in till ...!"-page

      On my pages there are about 20%-ie6 users (even 2 or 3 ie5 users) – thats pretty much but ...
      Often these old browser-users com from public or academic institutions. (btw I love woopra)
    • prim's Avatar
    • prim
    • Preeminent Rocketeer
    • Posts: 17290
    • Thanks: 217

    Re: How to keep ie6 users out?

    Posted 16 years 5 months ago
    • Try this:
      <?php
       
      &nbsp; &nbsp; $ua = $_SERVER['HTTP_USER_AGENT'];
       
      &nbsp; &nbsp; if (strpos($ua,'MSIE') != false && strpos($ua,'Opera') === false)
      &nbsp; &nbsp; {
      &nbsp; &nbsp; &nbsp; &nbsp; if (strpos($ua,'Windows NT 5.2') != false)
      &nbsp; &nbsp; &nbsp; &nbsp; { 
      &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(strpos($ua,'.NET CLR') === false) return; 
      &nbsp; &nbsp; &nbsp; &nbsp; }
      &nbsp; &nbsp; &nbsp; &nbsp; if (substr($ua,strpos($ua,'MSIE')+5,1) < 7)
      &nbsp; &nbsp; &nbsp; &nbsp; {
      &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; header('Location: http://yoursite.com');
      &nbsp; &nbsp; &nbsp; &nbsp; }
      &nbsp; &nbsp; }
       
      ?>
    • Please reply with a direct link to the issue & create a new thread for each new issue.

      A template is only as good as the content that goes into it ;) - DanG
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: How to keep ie6 users out?

    Posted 16 years 5 months ago
    • Thanks Prim!

      Where do I have to put these lines in?
    • Terp's Avatar
    • Terp
    • Elite Rocketeer
    • Posts: 1720
    • Thanks: 23

    Re: How to keep ie6 users out?

    Posted 16 years 5 months ago
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: How to keep ie6 users out?

    Posted 16 years 5 months ago
    • Thanks for the link!

Time to create page: 0.141 seconds