Reputation: 1
How do I redirect firefox users to one landing page, chrome users to second, and everybody else is not redirected ?
I GOT it to work for chrome but how do I set a firefox condition to this code?
<?php
if ( isset($_SERVER['HTTP_USER_AGENT']) )
{
$t_bIsChrome = strpos($_SERVER['HTTP_USER_AGENT'], 'Chrome');
if ( $t_bIsChrome !== false)
{
header("Location: redirect.php");
exit;
}
}
?>
Anyone know?
Upvotes: 0
Views: 487
Reputation: 88647
While I whole-heartedly agree with @Blender's comment above, if you really must do this, get_browser()
is the way.
Upvotes: 2