I'm interested in masking and shortening some URL's on my site, which is a wordpress blog. So far I've come across this method here: http://www.stevedawson.com/article0006.php and the code looks like this: <?PHP /* Save this page as jump.php and when linking to this script use the following: <a href="jump.php?m=XXXXXX">XXXXXX</a> Where XXXXXX is your merchant. */ if ($m == "") {$link = "http://www.stevedawson.com/mobiles/";} // Default Blank if ($m == "Just Phones") {$link = "http://www.awin1.com/awclick.php?mid=97&id=38362";} if ($m == "UKPhoneShop") {$link = "http://tracker.tradedoubler.com/click?p=985&a=949731&g=5119";} /* To add more jump links, just copy and paste one of the lines above and modify the $m and $link values */ header("Location: $link"); // Jump to the hiddden affiliate URL above exit(); ?> PHP: Now this works somewhat, but will bounce me back to my website URL that I've listed properly in the code, and it won't actually take me to the intended URL, (ex. http://www.awin1.com/awclick.php?mid=97&id=38362). I even tried it with the default settings, with the file the writer of this code (in the url above) provided, but I get the same result. Instead of being directed to any link, I get bounced back to his website (http://www.stevedawson.com/mobiles/). I've been searching online and this is the only way I've come across to mask a URL (besides tinyurl, which I don't want). Can someone please tell me what is wrong with this method and way it is being executed, or another way to do it altogether? Thanks.
Mod Rewrite create a file called .htaccess Then add in there Options +FollowSymLinks RewriteEngine On RewriteRule ^x y [L] x being the url you want them to see y being the real url for example http://www.awin1.com/awclick.php?mid=97&id=38362 RewriteRule ^awclick/$1/$2 awclick.php?mid=$1&id=$2[L] This will show awclick/97/38362
When I did that, it made my webpage give a 500 error and was inaccessible through the browser. Any idea why or other suggestions?