You can use your own link engine to hide outgoing links such as affiliate links. For example, if you wanted to direct visitors to Amazon when they visit yourblog.com/go/books, you could take the following steps:
- Login to your site via FTP, and create a folder called
goin your webroot (e.g. /www or /public_html or /httpdocs folder). - Create a file containing lines like this:
Redirect /go/keyword http://www.destination-url.com/affiliate-code
Name this file .htaccess (note the leading period) and upload it to the newgodirectory. Note: Windows will not let you name a file .htaccess on your PC. Give it another name and rename it to .htaccess after uploading. - Now we have to make WordPress ignore the “go” folder, or else it will redirect users into a WordPress error page. Open your main .htaccess file (the one in your webroot directory) and look for this line:
# END WordPress
Add this line after it:
RewriteRule ^go/.*$ - [PT] - Add more outgoing link keywords and URLs by editing the .htaccess file in your /go directory whenever you want.
