I have a page called blog in my nextjs
version 9.
Next
create a route /blog for my page. Now I want to have these routes to be mapped to the same blog page and consequently the blog component:
1. /blog/cat1/gold
2. /blog/cat2/silver
3. /blog/cat3/bronze
Actually, I want to use them as query parameters
in the route but I don't want to follow this format:
1. /blog?cat=cat1&color=gold
2. /blog?cat=cat2&color=silver
3. /blog?cat=cat3&color=bronze
I used next/router
asPath
but it is completely client-side and by reloading it returns 404!
In nextjs 9
dynamic routing has provided which may help me but the thing is I want to have only one component and different routes.
Do you have any ideas?