Getting the output from a parameter to use in _redirects

I’m making an asset redirect for my site using the _redirects file.

/asset?id=* http://example.com/asset/:splat 302

What I want to do here is get the output of a parameter, and then use it in the secondary url. For example, this is the original url.

http://othersite.com/asset?id=1

and it redirects to

http://example.com/asset/1

However, instead when I attempt to do this, it redirects to this instead:

http://example.com/asset/:splat?id=1

Which causes a 404.

Is there any way to work around this? Apparently “Query Parameters” are not supported yet, so a workaround would be nice to know.
The application I am developing around requires the ?id= parameter to properly function. I cannot remove it.

302 Found which is a redirect status.

Really!? What is it developed in/using?

Really!? What is it developed in/using?
Oh, it’s an old application from 2006. I’m not listing the name here, but it requires to use a param for assets, but with some redirects, it can be used without.

What do you mean by this? Sorry, I’m new to redirects. I have also tried using 307, but there is no difference.

307 Temporary Redirect is also a redirect status.

Given Query Parameters (as you correctly note) are not implemented (at least currently as per documentation) options are perhaps limited. Using a middleware function is one possibility.

Perhaps time to retire the 17 year old application and switch to something a little more modern.