I wrote back here about the benefits of using 301 redirects to both pretty-up and more easily manage your affiliate links.
This video goes step-by-step through the process of setting up the new folder and creating the index.php file, complete with the redirect code you need.
The actual redirect code, that you can grab and use, is set out below the video:
Here’s the code you need to paste inside the index.php file:
< ?php header("HTTP/1.1 301 Moved Permanently"); header("Location: http://www.Your-Affiliate-Link.com"); ?>
Just replace the
http://www.Your-Affiliate-Link.com link in the code above with your own affiliate link, then save the file as
index.php and upload it to the folder you created, as I described in the video.
Then use the new link (
http://www.yourdomain.com/your-new-folder) wherever you place your affiliate link.
Everyone hitting that link will automatically be redirected to your affiliate link. If you ever need to update your link just change it in the code above and re-save the index.php file. Everyone will then immediately be re-directed to the new affiliate link.
That’s it – any questions leave us a comment!