Hi all, I am interested to learn how you can redirect all links through a php script to add an affiliate id onto the end (if you have one for that site). So for instance, a user submits a post linking to www.bestbuy.com/productA. The link is fed through a php script which appends my BestBuy affliate id onto the link. All links on the site would feed through the PHP script, but only links to sites that I have an affiliate account with would change. Is this possible? I think that fatwallet.com does something to this effect. Example: Link submitted by user: http://www.amazon.com/exec/obidos/ASIN/B000BNKXEE/ Link visible on fatwallet.com: http://www.fatwallet.com/redirect/bounce.php?afsrc=1&url=http://www.amazon.com/exec/obidos/ASIN/B000BNKXEE/qid=852619/ref=nosim/fatwalletcom/v=glance&s=apparel/103-9687342-2089457 Destination link: http://www.amazon.com/exec/obidos/ASIN/B000BNKXEE/qid%3D852619/ref%3Dnosim/fatwalletcom/v%3Dglance%26s%3Dapparel/103-7057263-3387836
maybe a mod-rewrite with page.html fed to the php? .htaccess in products folder RewriteEngine on RewriteBase /products RewriteRule ^item-([^.]+).html$ index.php?i=$1[L] PHP: index.php in products folder $out = ''; switch ($_REQUEST['i']) { case "a": $out = "http://www.example.com/affiliate-info-a"; break; case "b": $out = "http://www.example.com/affiliate-info-b"; break; } if($out != '') header("Location: $out"); PHP: URL for product a == http://www.example.com/products/item-a.html Just musing, I didn't try to test this.