kobra500 1 Report post Posted April 21, 2008 Basically i want a code to redirect people to a different page if they're using anything but firefox, there are codes for it but i cant find 1. If anyone can give me a hand it would be appreciated!!! Share this post Link to post Share on other sites
galexcd 0 Report post Posted April 21, 2008 You could do this in javascript, but then nothing would happen to people with javascript disabled. I believe the best solution for this is to use some php. $redirect="http://redirecturlgoeshere.net;;if(preg_match('/Firefox/',$_SERVER['HTTP_USER_AGENT']))!=1) header("Location: ".$redirect); But if the reason you want to do this is because IE or some other browser isn't supported you might want to think about allowing safari as well seeing as they render pages almost exactly alike. Share this post Link to post Share on other sites
kobra500 1 Report post Posted April 21, 2008 Yeah bu safari is an apple program ... i dont want their kind visiting my site : D teasing! - (quoted cos i dont deserve credits 4 it) do i just replace the firefox bit with safari?? Share this post Link to post Share on other sites
galexcd 0 Report post Posted April 21, 2008 If you want to include safari do this: $redirect="http://redirecturlgoeshere.net;;if(preg_match(array('/Firefox/','/Safari/'),$_SERVER['HTTP_USER_AGENT']))!=1) header("Location: ".$redirect); Share this post Link to post Share on other sites
gameratheart 0 Report post Posted June 8, 2008 Thanks for the script, galexcd! If not anyone else, I know I will find it useful! Your script will mean I can continue to make the quality websites Firefox and Safari are good for, without worrying about whether inferior browsers such as IE will break them. I can just redirect them to a less standards-complaint page and job done! Share this post Link to post Share on other sites