You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
We have an application with URLs that look something like this:
/my-app/:type
/my-app/:type/:id
At some point, we wanted to remove the "my-app" part, so we changed the paths to this instead:
/:type
/:type/:id
And then to not break existing links, we added a path that redirects from old paths to new paths, using a splat param:
/my-app/*
The element for this path grabs the splat param, appends it to
/
and navigates to that page.All good, except for a case like this:
/my-app/doritos/
We expected this to navigate to
/:type
with:type = doritos
, but instead it renders/:type/:id
with:type = my-app
and:id = doritos
.What could we do instead here? Any tips or ideas? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions