re,
I can’t figure out how to remove a query string from URL, redirect to another URL and pass that query string to a PHP script:
RewriteRule ^shopping/paypal/([0-9A-Za-z]*)?$ https://myserver.com/shopping/? [R=301,L]
RewriteRule ^shopping/$ php/shopping.php [QSA,L]
Basically, when I get the following request:
https://myserver.com/shopping/paypal/?token=EC-3L827812DL640424T
I want it to redirect to:
https://myserver.com/shopping/
and since /shopping/ is a “virtual” directory, I want it to pass the token key and map to:
php/shopping.php?token=EC-3L827812DL640424T
Please advise. Thanks!
I’d suggest you use an intermediate PHP script like this:
where in savetoken.php:
Then in shopping.php you start the session and read the token value from it (and maybe delete it from the session, to prevent it from popping up in the future)