There are a few ways to do redirects to clean up affiliate links.
Here is a list of my top four
- PHP redirect – write the code yourself (see below ) This will work on any php based platorm.
- .htaccess redirect — again write the code yourself and edit the .htaccess file. This is more techy / complicated.
- Use a service like Bit.ly.
- WordPress Users – use a plugin like pretty link. There is another one called (gocodes) but prettylink is much more developed.
Php Redirects with errors
[cc]
* above, which is before the header() call */
header('Location: http://www.example.com/');
?>
[/cc]
Php Redirects Done Well
[cc]
header("Location: http://www.example.com/"); /* Redirect browser */
/* Make sure that code below does not get executed when we redirect. */
exit;
?>
[/cc]
.htaccess redirects done well
[cc]
RewriteEngine On
redirect 301 /recommend http://fields.mgeary1.hop.clickbank.net/ [L]
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
[/cc]