browser redirect php script needed

1 replies
Does anyone have a simple script to redirect visitors based on their browser type? For example, I'd like to take FF and IE users to go one page, and Safari/Chrome/Opera users to another.

#browser #needed #php #redirect #script
  • Profile picture of the author Voon
    Something like this?

    $useragent = $_SERVER['HTTP_USER_AGENT'];
    if (preg_match('/Firefox/i', $useragent) || preg_match('/MSIE/i', $useragent))
    header('Location: http://onepage');
    header('Location: http://another');


    {{ DiscussionBoard.errors[1527750].message }}

Trending Topics