Is there any way I can set up a redirect that redirects to one page 95% of the time and another 5% of the time?
Sure, this can be done with probably any server side language with use of a database. I wouldn't know of anything available for free that would do that, but a programmer could put something together fairly easily.
Maybe something like this is enough: <?php if (mt_rand(1, 95) >= 95) { header('Location: http://5percent.com/'); } else { header('Location: http://95percent.com'); } exit(); ?> PHP:
In a PHP file. But no other content could go there. It would redirect immediately to one of these pages.
Would this be the correct code for a 75/25 percentage? <?php if (mt_rand(1, 75) >= 75) { header('Location: http://www.75percentage.com'); } else { header('Location: http://www.25percentage.com'); } exit(); ?>
Actually, I think there's an error with both those codes. <?php if (mt_rand(1, 75) >= 75) { header('Location: http://www.75percentage.com'); } else { header('Location: http://www.25percentage.com'); } exit(); ?> Code (markup): Will do it on a 1/75 chance. <?php if (mt_rand(1, 100) >= 75) { header('Location: http://www.75percentage.com'); } else { header('Location: http://www.25percentage.com'); } exit(); ?> Code (markup): Would do it on a 25% chance, but it's still flipped... <?php if (mt_rand(1, 100) >= 75) { header('Location: http://www.25percentage.com'); } else { header('Location: http://www.75percentage.com'); } exit(); ?> Code (markup): Is the correct way to go about it.