I have recently moved my hosting from Windows to a Linux server. The previous affiliate tracking system was written in ASP which now been converted to php. But many of my affiliates still have the old links on their websites. I can redirect the the .asp links to the new .php pages with .htaccess. But I don't know how to pass the parameters with the redirect.
Something like this will work. The "%1" in the RewriteRule back-references the value that matches inside the parentheses in the RewriteCond, so the variable "123" in your example is passed on to the new URL.