I do most of my own SEO but when I have an affiliate site on WordPress (as most of mine are), I like to use the great SEO Ultimate Plugin. There are a few others out there (probably equally as good) but this plugin is my go-to when it comes to quick link masking, 404 detection, deep linking prefs etc.
There’s a new update out that expands on some of the functionality…
SEO Ultimate WordPress SEO Plugin Version 7.2.1 Released: “Link masking has two benefits: First, it lets you replace lengthy affiliate URLs with short, clean, internal URL masks (using 301 redirects, which have no search engine penalty). Second, Link Mask Generator automatically generates robots.txt rules that disallow your masked URLs, effectively neutering the juice-flow of the link, without resorting to the rel nofollow attribute. This combination makes Link Mask Generator a perfect tool for affiliate marketers.”
If you use WordPress, it’s worth a look as a plugin.
Here’s a PDF with all of the new features.