SE-Friendly Redirection and URL Mask

March 23rd, 2007 by Matt Huggins

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

I put together a basic search engine friendly script that performs URL masking and redirection. It’s nothing fancy, but it might help some of you who are into affiliate marketing. I plan to update it at some point with a basic setup page and simple click-through stat tracking, but this is a good start for those of you who don’t have anything like this set up.

Once you have the contents unzipped, you’ll want to modify the mappings to suit your needs. To do this, edit the settings.inc.php file. Initially, you will see several mappings similar to the following:

$redirects = array(
'day-job-killer' => 'http://AFFILIATE.dayjobkill.hop.clickbank.net/?tid=$1',
'ultimate-wealth-package' => 'http://AFFILIATE.imarichkid.hop.clickbank.net/?tid=$1',
'rich-jerk' => 'http://AFFILIATE.richjerk.hop.clickbank.net/?tid=$1',
);

Simply modify the list by placing the desired mask on the left, and the destination URL on the right. Basic use would occur through a URL such as:

http://domain.com/r/rich-jerk

which would forward you to:

http://AFFILIATE.dayjobkill.hop.clickbank.net/?tid=

Regular expressions can be used for special cases, such as tracking codes used in ClickBank. In the sample above, you could pass a tracking code of “email” by accessing a URL like the following:

http://domain.com/r/rich-jerk/email

which would forward you to:

http://AFFILIATE.dayjobkill.hop.clickbank.net/?tid=email

Download SE-Friendly Redirector, and let me know what you think in the comments here.

Related Posts:

4 Responses to “SE-Friendly Redirection and URL Mask”

  1. Michael Says:

    Interesting post. Since Blakeize.com didn’t sell on Ebay this week I set-up a 502 redirect at the server level to point the domain to an affiliate product.

    There was an option for masking, but I don’t know if I trust a mask when it comes to recording a sale.

    I’m going to re-list Blakeize.com when Blake makes it to the final 3.

    Michael

  2. cooliojones Says:

    I came here from ShoeMoney’s post, and I guess people were too busy arguing to even say a simple thank you. I’m not using this script yet, but I wanted to thank you for your efforts anyway!

  3. Matt Huggins Says:

    My pleasure coolio, thanks for stopping by!

  4. Rick Lim Says:

    Thanks for this tutorial. I had been wondering how to do that until i read this.


Rodney's Kontera DynamiContext Plugin plugged in.