This is an example of react where I can make specific dynamic query in the path
<Route
path="/products/page/:pageNo/sort/:sort/category/:cat/min/:min/max/:max"
element={<ProductPage />}
exact
></Route>
How do I do the same for next js? Any help? The solution that comes to my mind is creating subfolders within the folders but is there any other way to achieve this?