View Single Post
  #6 (permalink)  
Old 12-19-2008, 04:44 PM
Edwin Edwin is offline
5 Star Senior Member
 
Join Date: Feb 2007
Location: The Netherlands
Posts: 328
Default

If you want really clean looking URL's you can do the following:

First you create a redirect page to either simply 301 redirect or strip your referrer information, whatever works for you.

I'll use the example of a basic 301 php redirect which will keep your referrer information intact.

Open up notepad and copy and paste the following code and when you save it name it as you see fit, i.e. - you could name it if it is a affiliate program for digital cameras and the link goes to a product page for a Nikon camera, you name it nikonmodel500.php or something like that.

PHP Code:
<?
Header
"HTTP/1.1 301 Moved Permanently" );
Header"Location: http://www.your-affiliate-link-goes-here.com" );
?>
The reason why is in the event your visitor has javascript turned off it will still show a decent link.

But since almost everybody has it turned on we can take it to the next step and that is to make your link look like whichever link you want it to be.

So when your affiliate link links to Amazon's product page, you can actually show the Amazon product page in the status bar.

Your visitor will not see it links to a affiliate url nor that it links to a page on your own site.

With the previous page you have created ready you will continue by creating the link code you use on your sales page as follows:
PHP Code:
<a href='/nikonmodel500.php' name="http://www.amazon.com/nikon500/">Buy Nikon 500</a
Then you place this code at the bottom of your page:

PHP Code:
<script language="javascript">
_links document.getElementsByTagName("a");
for(
i=0;i<_links.length;i++) {
if(
_links[i].name) {
_links[i].onclick = function() {
window.location this.name;
return 
false;
};
_tmp _links[i].href;
_links[i].href _links[i].name;
_links[i].name _tmp;
}
}
</script> 
Doing all this you will now be able to show whichever url in the status bar to your visitors and when clicked it will in a blink of an eye use the redirect that you've created and uploaded to your server holding your affiliate url to Amazon's product page.

One of the better ways to mask your affiliate urls, since it actually looks like a official url when you hover over it, upon clicking it you'll briefly see the redirect to the php page you've created, but the non-webmasters you cater to would probably not even notice this most of the time.
Reply With Quote