I have written a small script go.php that takes the link parameter from the referring url and then redirects the user after a few seconds to that page.
For example the refferring url is:
http://www.site1.com/go/go.php?url=http://www.site2.com
The go.php script includes the following code:
<script type="text/javascript">
function movetopage(){
window.location = "<?php echo $_GET['url']?>"
}
</script>
<body onLoad="setTimeout('movetopage()', 3000);">
This works absolutely fine if the url I'm sending people to is a standard domain name.
But I want to refer it to an affiliate offer, and that affiliate offer also redirects in the form of:
http://site1.com/go/go.php?url=http://www.site2.com/redirector.aspx?aid=6352
Something is wrong, when go.php initiates the movetopage function to send them to the next link it returns a 404 and I'm guessing this has something to do with the second redirect.
Can someone please tell me how I can adjust the code to get this working, thanks!