I am wondering if there is a more efficient way of serving a large number of link redirects. For the background: my site receives tens of thousands of users per day, and we have a " deep link " to a large number of individual product pages on affiliate sites.
To "close" affiliate links and keep them all in one place, I currently serve all of our affiliate links from a single PHP file, for example. the user clicks on mysite.com/go.php?id=1 and goes to the page on the seller’s website, attached to our partner cookie, where you can buy the product. The code I use is as follows:
<?php
$path = array(
‘1′ => ‘http:
‘2′ => ‘http:
‘3′ => ‘http:
);
if (array_key_exists($_GET['id'], $path))
header(‘Location: ‘ .$path[$_GET['id']]);
?>
, , , , php 11K + . , FTP , 2 , , . , php - , , , , .
, . .php (, go2.php), , go.php , . ? Wordpress, mySQL, PHP , , .
- , .. PHP , URL- , php , , 100K - .
? , , , ? , php, ? / !