Reroute a dynamic url to different url in Neos

I have a site where we keep a bunch of product (as pages) in a specific folder. Each of these products have a specific category assigned to it. Category is a form-field [Select field] for a particular product-page in back-end.

So, if i access the site like

(in the above url /product/ (in path, after domain name) is the folder name, product1.html is a subtype of page where we store the product data.)

it renders just fine as it should.

What i would like to do in that is i want Neos to have a dynamic url
fe: https://domainname/category/product/product1.html,

to render the contents which is available in page https://domainname/product/product1.html.

I would like to know, on how to approch this problem in neos.

You can create a new NodeType `“ShadowProduct” with a reference property (to the main product), and then override the redering to not render the local document but the referenced one.

The snippet bellow will render the content of the main content collection from the produce reference in the property referenceProduct.

prototype(Neos.Neos:Page) {
    body {
         main = ContentCollection {
            @context.node = ${Neos.Node.nearestContentCollection(q(documentNode).property('referenceProduct'), this.nodePath)}

You should take care of canonical URL too, can tweek the rendering based on whatever you want, …