Here is a quick tutorial along with the files to do what you want.
How to cloak affiliate links
Do you have affiliate links on your site that you want to hide? It is easy to do with this little script from bmcoll.com and its free. Very easy to install. This post will guide you through it even if you know very little about php programing.
This next part is also included in the read me file that comes with the script.
Enjoy!!
how to install
1 create a folder on your server called redirect . You can use another name if you choose just
be sure to make the correct changes in the other files.
2 Open the file called .htaccess
Change the line that says (
www.bmcoll.com ) to your domain name
( catioun only change the
www.bmcoll.com ) leave the rest of the line alone!!
3 open the file
index.php
You will see lines that look like this
"bmcoll"=>"http://www.bmcoll.com",
"google"=>"http://www.google.com",
"ebay"=>"http://www.ebay.com",
"wall"=>"http://www.walmart.com",
"snoops"=>"http://www.snoops.com/",
"cj"=>"http://www.cj.com/",
"yahoo"=>"http://www.yahoo.com/",
"msn"=>"http://www.msn.com/"
As long as you keep the same format you can add as many lines as you want
Here is how it works look at the first line lets break it down
"bmcoll" This is the shortcut name for the link you are cloaking.
"http://www.bmcoll.com" This is the address where you want the user to be sent
So change bmcoll to the name of your choice,And change the
http://www.bmcoll.com to where you
want to send them.
Now you are ready to upload them to your server
You created a folder called redirect . Now upload both files to that folder.
Thats it. Now how to use it
Thats very simple too Lets look again at the first link ( bmcoll"=>"http://www.bmcoll.com", )
lets say you did not change that line. If you point your browser at
http://www.yourdomain.com/redirect/bmcoll.html
it would redriect you to my home page.
So basicly once you create all your shortcut names in the file you just create the link like
this
http://www.yourdomainname.com/shortcut.html
If you have further questions you can pm me
Thanks I hope this can be of use to you.
Get the zip file here
http://www.bmcoll.com/ebooks/redirect.zip
Here is the code for those who want to copy and paste
redirect.php
Code:
<?php
$goto = strtolower($_GET["name"]);
$sites = array(
"bmcoll"=>"http://www.bmcoll.com",
"google"=>"http://www.google.com",
"ebay"=>"http://www.ebay.com",
"wall"=>"http://www.walmart.com",
"snoops"=>"http://www.snoops.com/",
"cj"=>"http://www.cj.com/",
"yahoo"=>"http://www.yahoo.com/",
"msn"=>"http://www.msn.com/"
);
header("HTTP/1.1 301 Moved Permanently");
redirect;header("Location: " . $sites[$goto]);
exit();
?>
.htaccess
Code:
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*)\.html$ http://www.bmcoll.com/redirect/index.php?name=$1
__________________