Amazon affiliate links cloaking technique - enjoy
Of course, such simple structure of an affiliate link is widely open to so called stealing affiliate sales, when your affiliate ID is removed or replaced. Hence, link cloaking becomes even more important. However, considering that most Amazon affiliate sites promotes multiple products, making individual redirects for all of them is complicated.
Instead you will be able to use the links looking like:
http://YourSite/asin/ASIN
by creating "asin" folder on your server and placing just two files into it. The files are .htaccess (if you run under Apache server as most people do) and index.php. You have to have module rewrite enabled and php available to use this.
.htaccess file:
>>>> CUT HERE >>>>
RewriteEngine on
# Rewrite URLs of the form 'x' to the form 'index.php?asin=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /asin/index.php?asin=$1 [L]
<<<<<<<<<<<<<<<<
index.php:
>>>> CUT HERE >>>>
<?php
$amazonId = "httpwwwgalien-20"; // <--- put your Amazon ID here
if (!empty($_GET['asin'])) {
$link = "http://www.amazon.com/dp/" . $_GET['asin'] . "/?tag=" . $amazonId;
}
else {
$link = "http://YourSite"; // <-- put your site address here
}
header("Location: " . $link);
exit();
?>
<<<<<<<<<<<<<<<<
-
p307ig -
Thanks - 1 reply
{{ DiscussionBoard.errors[1213319].message }}-
MSGeek -
Thanks
{{ DiscussionBoard.errors[1216123].message }} -
-