Support » Plugins » Redirect IE8 users to another site

  • I’m looking for a way of redirecting Internet Explorer 8 browser users to another site (IE8 is having problems displaying my new site so I want to send all IE8 users to another domain with my old site which displays fine). I’ve got the ‘php-browser-detection’ plugin installed but not sure how to set up a redirect. I know the code for a redirect is something like this:

    <meta http-equiv=”Refresh” content=”0; url=http://domaingoeshere/”>

    And I think the code needs to go in here where ‘do stuff’ is.

    <?php if ( is_lt_IE8() ) { do stuff }; ?>

    I’m not a coder so I may have this totally wrong but if anyone can help that would be great. Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • I too would like the answer to this question.

    This was already resolved about 5 months ago. Here’s the link:

    The solution suggested by Big Bagel worked.

    This topic has come up a few times with questions about the PHP browser detection plugin, but this is not what it is built for…

    As mentioned in the post linked to above, redirecting based on browser is a bad idea because it is considered black hat SEO technique.

    It would be much better to hook into the template_redirect action and serve a different page template.

    But there is usually a simpler way to solve cross-browser issues within the page, which is the real intent and best way to use this plugin. But if you really want to send to a new “page”, I would recommend using the template_redirect hook.

    Thanks, I tried the suggestion at to no avail. It ignored the redirect and served the original page to IE8 – a blank page, in fact, as IE8 has problems. Tried it several times, checked that code was actually being served, but nada. Went back to the plugin and modified that to give IE8 users a chance to go to a static page.

    Here’s the code, which I pasted at the start of the header.php. I tested it on a PC running Windows XP on IE8 and it redirects no problem. Might be worth trying Marty’s suggestion if that doesn’t work.

    <?php if ( strpos( $_SERVER[‘HTTP_USER_AGENT’], ‘MSIE 8’ ) ) {
    header( ‘Location: http://domaingoeshere‘ );
    } ?>

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Redirect IE8 users to another site’ is closed to new replies.