16th Hide your affiliate links using .htaccess file

I’ve been searching for a method to hide the affiliate link for months. If you?re long involve in the affiliate programs then hiding affiliate links might just a simple daily routine work. Please let me know if you have a better idea. The best method that I found so far is by using .htaccess file to redirect your affiliate link. For example, you have an affiliate links that looks like below:

http://www.affiliate.com/join.html?refer=123456

You can redirect the above link using the URL below:

http://www.yourdomain.com/sample.php

That means you will be using the new URL for the link instead of the old affiliate link. Your visitors will only be shown by the new URL. When they click on the new URL, they will be redirect to the old affiliate link or the destination you wanted. All you need to do is place 2 simple lines into your .htaccess file.

RewriteEngine on

RewriteRule ^sample.php$ http://www.affiliate.com/join.html?refer=123456 [R]

You can place it at the bottom of the file. If you have another affiliate link that you need to add, just repeat the above steps. Replace sample.php with another name that you like and change the affiliate link. Then add the 2 new lines at the bottom.

P/S: Check out this post on how to access your .htaccess file.

If you enjoyed this post, please consider to subscribe to the feed and get future articles delivered to your feed reader.