Forum Moderators: phranque
I need to capture an id within a query string and somehow store it before it gets removed from the URL.
eg.
External URL1: www.example.com/?refid=999
External URL2: www.example.com/page/content/?refid=999
So I have this in htaccess which removes the query string from both of the above (and any other) URL:
RewriteCond %{QUERY_STRING} ^refid=
RewriteRule ^(.*)$ /$1? [R=301,L]
The problem is I can't see how to store the 'refid' before it gets redirected. Currently I capture it in a session which is triggered once the PHP page has loaded, which won't be possible if it gets removed before the session is created, right?
Am I looking at this wrong? Any ideas how this is done?
Now I'm at the end of writing this I'm not even sure this is the right forum! Any help appreciated.
Jim