I am creating a website with a referral scheme, where the referral URL will be something like http://example.com/123456
I would like to display the URL as simply http://example.com/ but still capture the 123456 and give the referral point.
Would it be possible to do this with .htaccess mod_rewrite? something like
RewriteRule ^([0-9]+) ?ref=$1 [L]
would work to forward the URL, but is there a way to redirect here and display http://example.com/ in the address bar, without the referrer code?
It would obviously be possible with PHP Headers but I'd prefer not to use this if at all possible.