I currently use register.php?referal=gamestand on my website so that when the user visits my website through the referal website, I can track how many players have registered from that place.
referal=gamestand will automatically fill in an input textfield within the registration process using echo $_GET['code'];
The problem is... on Google I have loads of links from these referals and I'd like to 301 them to my register.php page to merge the SEO score into one and eventually remove these silly register.php?code=gamestand style links from google.
I've got this rewrite rule... which removes the ?code=gamestand bit, but it doesn't actually pass the parameter, probably because it's redirecting and sending nothing?
RewriteCond %{QUERY_STRING} ^(.*)code(.*)$
RewriteRule ^(.*)$ http://localhost/mywebsite/httpdocs/register.php? [R=301,L]
it will change register.php?code=gamestand into register.php but as I said, $_GET['code'] is now empty and I'm back to square one!
Appreciate any help if anyone knows anything... Thanks! Dom