使用Steam身份验证的页面重定向和引荐来源

I am relatively new to programming and have become stuck. I am unsure of what to call this (and what to search to find the answer) so if it is a duplicate or the answer can be found easily please forgive me.

So on my site I give a referral URL to users which is something like

www.example.com/referral.php/?id=1234

My problem comes from when someone visits my site with that link.

Once they click the enter that link and come to my server. They are then prompted to login through Steam servers and after that they are returned to my site with a URL which is something like this

www.example.com/referral.php?login&openid.ns=... it continues on for a while.

Is it possible to have them return to my site with this link?

www.example.com/referral.php/?id=1234

As it is what my site uses to register referrals.

Or is there some workaround possible such as I pull the id and put it on a cookie or something similiar on the first visit to the site.

Thanks for the help.