Browser checker issue
- Started
- Last post
- 5 Responses
- MrNibs
Wondering if there is anyone here that has run into a problem with their browser checker? The one I currently have on a site we did is redirecting IE8 when it is only supposed to redirect IE6 users. wtf?
Anyone on IE8? can you hit this site and let me know if it dumps you to the browser.php page or sends you to the site.
I hate it when my programmer leaves town!
this is our checker:
$ua = $_SERVER['HTTP_USER_AGENT'];
if (preg_match('/\bmsie 6/i', $ua) && !preg_match('/\bopera/i', $ua)) {
$ie6 = true;
}
else {
$ie6 = false;
}
if (!$_COOKIE['IE6_pass'] && $ie6 == true) {
header('Location: http://www.tylerengle.com/browse…
exit;
}
- MrNibs0
helps if I put the URL: http://www.tylerengle.com
- bigtrick0
works fine in ie8 for me - no redirect.
- MrNibs0
thx big trick! Not sure why I have a user on IE8 that says he is getting the redirect. I can hit the site on IE8 without a redirect as well.
Might have to track down the user and find out what's going on with his setup.
- acescence0
log the user agents to a file and have them visit, then you can see exactly what it's matching against