Fallback for route string #1615
-
Hi @brillout, I'm currently working with a route string and I have the following probem. // /pages/m/@id/@slug
// Matches the URLs:
// /m/sjdhfksd/redirected-slug/
// /m/id8eyjdh/redirected-slug/
// /m/id8eyjdh/redirected-slug/blog/getstarted
// ...
export default '/m/@id/@slug/*' We use the id to identify the item and always redirect to the correct slug for SEO reasons. I'm making the configuration in the When I have this url -> So this Any ideas or workarounds on how to solve it? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
How about using a Route Function with |
Beta Was this translation helpful? Give feedback.
How about using a Route Function with
throw redirect()
? Alternatively you can use*
instead of@slug
to redirect every path after/@id/
(in case that's something you want).