I'm doing a redirection in site 1 to site 2 using this script built into the head of site 1:
<script>
window.location.href = 'http://www.sitio2.com/?redirect=true';
</script>
and then in site 2 in the index.php I include this in the head:
<?php
if (isset($_GET["redirect"])) {
$hash = $_GET["redirect"];
if ($hash !== "") {
header("Location: http://www.sitiofinal3.com");
die();
}
}
?>
Well, if the user enters site 1 goes directly to site 2 and the latter will redirect him to a third and final site. On the other hand, if I access site 2 without going through site 1, it will not redirect to site 3. This is clear and works well. The problem is that when the user arrives at site 3, site 3 sees site 1 as referer and not site 2.
I need when the user lands on the final page (in the example, is page 3) the referer that is seen is site 2 and not 1 as it happens now. What I can do? It would be very helpful to me.
Thank you very much in advance.