Unfortunately, I can not find a normal example in the documentation that is similar to http://symfony.com/doc/current/routing/custom_route_loader.html but I feel this is an option for me in part.
The situation is valid there is a site directory:
site.ru/{+d}/ - displays all products depending on the price
site.ru/{slug}/ - and so a category page can be displayed, or a product depending on the slug (the problem is that in each category or product table there is a corresponding slug field - you can of course make one table (or make a presentation) and by communication one-to-one to get the right slug and then everything will be much easier using forwarding)
i.e., the usual logic can be redirected to the required action controller, depending on what came in the parameter, of course, you can be cheeky, and in the Index controller you can do all these checks and pull out the necessary logic through the service, or go on the easy way (site.ru/ category / {slug} / and site.ru/product/ (asslug ()/), but I want to see somewhere how to make the current situation as much as possible with the “right” approach?
site.ru/catalog/{category_slug}/{product_slug}/than not suitable? - Mikhail Rebrovsite.ru/{slug}, and the products would havesite.ru/{slug}.xhtmlextension.xhtml ... or there would be an identifier in front of the product, and thensite.ru/{id}_{slug}code /site.ru/{id}_{slug}- Mikhail Rebrov