Silverstripe Version: 4.7
Question:
I’m using javascript routing via the history api for a section of my website.
I would like to set up Silverstripe routing so that all of the sub urls of a particular page route to the top level page, so that the javascript can handle the routing from there, i.e.:
/products/category
/products/category/subcategory
should both route (not redirect, I want the urls to stay the same) to
/products
which is the products page
I’ve tried many different combinations in routes.yml, PageController & ProductsPageController but nothing seems to work