Following up with more context. Hoping @fool or @Dennis can help me out.
So I’ve been playing with this a bit more to try and figure it out. I’ve found that doing a regular redirect rule works as expected. But using rewrites doesn’t work as I would expect.
Note: all of these examples are using my preview build at: https://5ff7956eba84190008348a88--macosicongallery.netlify.app
Redirects (301s)
Here’s the redirect rule in my _redirects file:
/netlify-support-test-no-200 /404.html?foo=bar
Because I didn’t specify a HTTP code, it uses a 301 and redirects the user from one path to another with the specified query params.
If I curl that resource, I can see I get a 301 redirect to the 404 page with the query parameters.
If I hit that URL in my browser – /netlify-support-test-no-200 – it redirects to the 404 page with the query parameters in the URL bar.

Cool, that works just as expected.
Rewrites and proxies (200s)
If I setup a URL to rewrite with a 200, then I don’t see the query parameters show up. Here’s the rule in my _redirects file:
/netlify-support-test /404.html?foo=bar 200
If I curl this resource, it returns a 200 with the contents of the 404 page. That makes sense:
If I hit it directly in my browser (/netlify-support-test) I see the contents of the 404 page (same as the redirect above) but my browser’s URL doesn’t change (and doesn’t have the query params in it)

That all makes sense. Because this is a rewrite, Netlify is making a request to the URL with the query params behind the scenes, so any query params are hidden from the URL bar and from the curl.
But that request that’s happening behind the scenes isn’t working as expected
I have one more rewrite rule setup. This one is designed to be a rewrite that points to a URL with query params. Here’s the rule:
/netlify-support-test-params /.netlify/functions/netlify-support-test?foo=bar 200
Note that this is pointing at a netlify (lambda) function with explicit query parameters. The lambda function’s code is really simple. It’s essentially echoing back the query parameters.
So my expectation is that if I curl /netlify-support-test-params I’ll get a 200 and it will echo back {"query": {"foo": "bar"}. But it does not. The lambda receives no query parameters:
However, if I do include some query params myself in the request, it echoes those back. For example, if I curl /netlify-support-test-params?hello=world, I get a 200 with {"query":{"hello":"world"}} echoed back to me:
What gives?
Is my expectation incorrect here? It appears Netlify’s rewrites/proxy engine is not actually making a request with query params in tow. To restate:
Given this rule: /path /rewrite?with=params 200
I expect: a request to /path will result in Netlify making a request to /rewrite?with=params behind the scenes and then returning a 200 result to /path.
But what I get is that a request to /path results in, apparently, Netlify making a request to /rewrite without any query params and returning a 200 result to /path.