AEMaaCS URL formatting via dispatcher
I have a site URL as https://mycompany.com/en-us/office/printers/func-print/cap-color/paper-ltr/vol-2501-10000/speed-36-50-ppm/brand-c-series/feat-airprint
I want the dispatcher to do a PT and send it to publisher using selectors as https://mycompany.com/en-us/office/printers.func-print.cap-color.paper-ltr.vol-2501-10000.speed-36-50-ppm.brand-c-series.feat-airprint.html
Since the number of selectors are dynamic (currently max of 7) and can even increase over time, how should I handle the rewrite rule dynamically N times?
Below are all valid URL’s for my site which I need to be formatted with selectors:
https://mycompany.com/en-us/office/printers/func-print
https://mycompany.com/en-us/office/printers/func-print/cap-color
https://mycompany.com/en-us/office/printers/func-print/cap-color/paper-ltr
https://mycompany.com/en-us/office/printers/func-print/cap-color/paper-ltr/vol-2501-10000