Hi there, hope you can help,
I am trying to pass a url as a variable to to a redirect page.
I have it working fine BUT if there are parameters on my url that I am sending, my redirect doesn't work (I get a 404 page).
For example my code is as follows:
<?php
$Product_URL = [
website2.com...]
$Product_URLCODED = urlencode("$Product_URL");
echo "<a href='http://www.mysite.com/redirect.php?site=$Product_URL'>";
?>
Then on my redirect.php where I receive the url I have:
<?php
$site = $_GET["site"];
header( "Location: $site" ) ;
?>
It seems to work if there are no parameters on my original url ($Product_URL) - not sure if I need to decode the url afterwards - and if so how to do that.
Any help much appreciated!