Redirect to functions url doesn't work as expected

Holla everyone,

I tried a 200 redirect to my netlify function that takes a parameter for example
/test/* /.netlify/functions/task?q=:splat 200

But apparently it only redirects it to
/. netlify/functions/task

But then I tried adding a query parameter to the new url and it worked via /test?q=hello-world

Any suggestions as I’d like to avoid query Params in my urls

Hey @Genius

Given the redirect

/test/*    /.netlify/functions/task  200

any path such as /test/some-task or /test/some/task is available via event.path within the function. You can run checks on and manipulate this just as you would with any query string.

2 Likes

Thank you. This worked for me

1 Like