stuck with php redirects !!!
Posted: Wed Jun 16, 2010 2:37 pm
Hi everyone,
Im trying to redirect all my affiliate links through 1 file, go.php although I can't seem to get it working
my urls are:
mydomain.com/go.php$id=01
mydomain.com/go.php$id=02 etc
my code is as follows:
I can get one url working on it's own but need to do multiple urls via 1 page, also is this safe?
Thanks
John
Im trying to redirect all my affiliate links through 1 file, go.php although I can't seem to get it working
my urls are:
mydomain.com/go.php$id=01
mydomain.com/go.php$id=02 etc
my code is as follows:
Code: Select all
<?php
switch ($id) {
case "01":
header("Location: $http://tidd.ly/d4db0265");
exit;
case "02":
header("Location: $http://tinyurl.com/2dnjpp9");
exit;
}
?>Thanks
John