How to redirect and pass search params?
I have a legacy route that has to be redirected to a new route, and I need to pass all search params passed to that route, how do I achieve this using a zod validator?
4 Replies
inland-turquoise•2w ago
throw a redirect in its beforeLoad
optimistic-gold•2w ago
Oh, I have a similar case! I have legacy search params, and I want to remove them from the URL if they don’t pass up-to-date validation. Is it possible to trigger a redirect from
validateSearch
to do that? Or is there a better way?wise-whiteOP•2w ago
Just doing a redirect removes all search params though
Does the trick
inland-turquoise•2w ago
search: true
should work too