Jump to content
xisto Community
kobra500

Redirect If Not Using Firefox

Recommended Posts

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

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

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.