Cyprich.com

Occasionally Relevant Insights from a Software Builder

By

Hiding Affiliate Links

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.

3 Responses to Hiding Affiliate Links

  1. 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.

  2. Johan says:

    That’s what I suspected. I thought it might have been like Geocities was where you can create subfolders and populate them with pages.

  3. Pingback: cyprich.com » Make Your Own Text Link Ads

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.