domain.addict VIP Member VIP ★ 20 ★ Impact 55 Jul 11, 2005 450 views 2 replies #1 I have a domain name where I'd like to redirect a % of the visitors to a different location. Is that possible and how? Thanks in advance.
I have a domain name where I'd like to redirect a % of the visitors to a different location. Is that possible and how? Thanks in advance.
E eagle12 Established Member ★ 20 ★ Impact 8 Jul 12, 2005 #2 i would do it something like this: PHP: $visitor = rand(1,100); if($visitor <= 20) header("Location: http://www.yahoo.com"); else header("Location: http://www.google.com");
i would do it something like this: PHP: $visitor = rand(1,100); if($visitor <= 20) header("Location: http://www.yahoo.com"); else header("Location: http://www.google.com");
phleet Established Member ★ 20 ★ Impact 0 Jul 20, 2005 #3 Out of curiosity, would this work? PHP: if(rand(1,100) <= 20) header("Location: http://www.yahoo.com"); else header("Location: http://www.google.com"); No real purpose in using a variable if its only being used once for a very simple thing.
Out of curiosity, would this work? PHP: if(rand(1,100) <= 20) header("Location: http://www.yahoo.com"); else header("Location: http://www.google.com"); No real purpose in using a variable if its only being used once for a very simple thing.