How do I Split Test 2 Landing Pages? PHP not workinf 4 me...

Discussion in 'HTML & Website Design' started by rickybuitrago, Sep 20, 2008.

  1. #1
    Hey,

    I heard of a method using a PHP code that should be pasted on the index file and then the code would redirect to 2 lanidng pages randomley. I used the code, but didnt work, it wasent redirecting visitors - the page appeared blank.

    This was the code:

    <?php
    if(rand(0,1) == 0) {
    header("Location: http://www.example.com/split1");
    } else {
    header("Location: http://www.example.com/split2");
    }
    ?>


    What am I doing wrong? I changed the urls to mine and the filneames and added the html extensions....

    Where exactly should I paste the code? Im new to html to maybe the code is in the wrong place of my source...
    Thanks!!!
     
    rickybuitrago, Sep 20, 2008 IP