Answer the question
In order to leave comments, you need to log in
How to make a router with nested urls in php/nodejs?
How to make a router correctly so that the url is nested, and we do not know the amount of nesting.
You can do it like this (nodejs)
Route.get('/:category', 'FrontController.')
Route.get('/:category:subcategory', 'FrontController')
Route.get('/:category:subcategory:page', 'FrontController')
Answer the question
In order to leave comments, you need to log in
If we are talking about node + express, then there you can set regular expressions as the first parameter
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question