Wednesday, March 11, 2015

PHP-Load other page / landing page on first time url hit

Load other page / landing page on first time url hit



$ref_url = $_SERVER['HTTP_REFERER'];
$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";

if ($ref_url == '' && $actual_link  == 'http://your-site/') {  
    header('Location:http://your-site/landingpage.html');
    exit;
}


Njoy  :) :) 

No comments :

Post a Comment