Hiding affiliate urls

Let’s say you are a webmaster into a few affiliate programs. You will have URLs which will look like;

http://www.somesite.com/?id=xyz

or

http://www.somesite.com/affiliate/xyz

or something like that.

The best way of getting visitors to not go directly to the site is making them believe (and the searchengines for that matter), that you are not an affiliate but that it is your site.

You do this by registering a domain and then using mod_rewrite in Apache:

Let’s say we registered www.someothersite.com and you want to rewrite, without users be able to see, this url to http://www.somesite.com/?id=xyz, you should set, in Apache;


ServerName www.someothersite.com
RewriteEngine On
RewriteRule (.*) http://www.somesite.com/$1?id=xyz [P]

No-one will be able to see the id in the URL without using frames, iframes etc.

Be the first to leave a comment. Don’t be shy.

Join the Discussion

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>