This question already has an answer here:
- Redirect user based upon HTTP_REFERER 3 answers
I am trying to redirect Visitors to a site based on their referrer url.
Visitors coming from "x" should be redirected to "x1" and Visitors coming from "y" should be redirected to "y1" and so on....
Here x and y are any website url(SOURCE) & x1 and y1 are also website url but these are DESTINATION..
i am trying to do the same with below written but its not working...
<?php
$referrer = $_SERVER['HTTP_REFERER'];
if (preg_match("/site1.com/",$referrer)) {
header('Location: http://www.customercare.com/page-site1.html');
exit;
};
?>
</div>