Redirect based on browser ?

Jan 23, 2009
756
7
0
Im trying to find a php code for redirecting traffic based on browser, but can't find it.

So for example:

if the visitor uses firefox, they will go to SITE A
if the visitor uses windows, they will go to SITE B
if the visitor uses safari, they will go to SITE C

Anyone fluent in PHP can probably write it in 30 seconds.

Thanks in advance.
 


Also, don't know what you're trying to do - but I'm guessing you're having some rendering issues w/ specific browsers. If this is the case, it might be better if you simply swap style sheets out rather than redirect to an totally different version of the site. Have 1 main one for all the major stuff that works cross browser, and create separate small ones to fix margin, positioning problems in IE6 etc.

I'm just guessing though, that might not be the reason you're doing this.