Query param redirects with spaces in values

Hello! I’m trying to create a redirect and can’t seem to get it to work for my site: https://gigpro-marketing-production.netlify.app/

The problem seems to be related to the fact that the url I’m trying to redirect from has a query param with a value that has a space. I have other similar redirects that work fine, but they don’t have spaces in the value.

Example that doesn’t work:

/browse-shifts shift-type=Event+Server /connect 301!
Notice the “+” that represents the space in “Event+Server”

Example that does work
/browse-shifts shift-type=Barback /connect 301!

I’ve read all of the documentation available (including this), searched the forums, tested the redirects using the https://redirects-playground.netlify.app/, all redirects are applied successfully in the deploy logs, and can’t seem to get it to work.

Thank you!

@jcarroll2007 It may not even be applicable, but have you tried with %20?

@nathanmartin I have tried that as well and had no luck getting it to work either unfortunately.

It was worth a shot.

It seemed the most likely based on these threads:
https://answers.netlify.com/t/redirect-with-space/24671
https://answers.netlify.com/t/redirects-containing-whitespaces-or-20/30133
(Although none of those were working with the query param.)

If the built in Netlify redirects system can’t handle it, you could use Edge Functions.

Here’s an example that gets you fairly close:
https://docs.netlify.com/edge-functions/api/#return-a-redirect