Hiding Affiliate Links
Posted by Johan Cyprich on 06 May 2007 | Tagged as: Programming
There may be certain situations when you need to hide a URL on your web site. This is useful, for example, in changing the display URL for affiliate links. While there are several good techniques for accomplishing this, I prefer using the refresh metatag to redirect users entering that page to another location.
This is how it works. When you open a URL, such as www.cyprich.com, it will automatically look for a page called index.htm, index.html, or index.php (if you have PHP installed on your web server). An ASP.NET server will try to open a page called index.asp, index.aspx, or Default.aspx. These default pages can be defined by the web server settings for that URL.
The defaults also work for subfolders. For example, if you open www.cyprich.com/richmond/ and there is a file called index.php in that folder, it would be opened just as if you would had entered www.cyprich.com/richmond/index.php.
You can redirect a user that opens a web page with the refresh metatag as the following example shows.
====[ index.php ]===============
<html>
<head>
<meta http-equiv=”refresh” content=”0; url=http://www.advertiser.com/id=57912″>
</head>
<body>
</body>
</html>
=============================
So now when someone moves the mouse over the linked ad, they will see http://www.cyprich.com/richmond/ and when they click on it, they will be directed to www.advertiser.com/id=57912.
This technique for hiding affiliate links is very easy to do because all you have to do is define the url in the refresh tag. However, in order to hide links this way you need to be able to log into your web site by FTP or SSH and create these subfolders. I’m not sure if you can do this sort of thing in Blogger or similar sites.
| Related posts: | |
|
|
Share this post:
Follow Me:
Did you find this post interesting and useful? You can keep up to date on this blog by subscribing to my RSS feed, or you can have new posts sent to you by e-mail. You can also follow me on Twitter.
3 Comments »
Tweet This Post!
















on 07 May 2007 at 9:21 am 1.Steve.Lippert said …
I don’t believe there is a way to FTP anything to blogger. The best you can do is e-mail to a special e-mail address to have things posted to your blog.
on 08 May 2007 at 1:24 am 2.Johan Cyprich said …
That’s what I suspected. I thought it might have been like Geocities was where you can create subfolders and populate them with pages.
on 19 May 2007 at 8:20 pm 3.cyprich.com » Make Your Own Text Link Ads said …
[...] with a page linking to my account on the affiliate site. You can learn how to do this by reading Hiding Affiliate Links on my blog. If you don’t want to hide your links, you can use the URL given to your by your [...]