LeXeR Posted November 7, 2008 Share Posted November 7, 2008 How can I redirect a user if he or she is not using firefox ? please help ! I'm old user of php but i don't know how to do this script i tried this but it doesn't work <?php $redirect="http://www.redirecturlgoeshere.net"; if(preg_match('/Firefox/',$_SERVER['HTTP_USER_AGENT'] '!=1'))) header("Location: ".$redirect); ?> Link to comment https://forums.phpfreaks.com/topic/131833-need-a-help-with-redirecting/ Share on other sites More sharing options...
trq Posted November 7, 2008 Share Posted November 7, 2008 <?php if (strpos($_SERVER['HTTP_USER_AGENT'], 'Mozilla') !== FALSE) { // do redirect. } ?> Link to comment https://forums.phpfreaks.com/topic/131833-need-a-help-with-redirecting/#findComment-684848 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.