In my application, there can be n number of params in the URLn and then it can have an optional following pattern too. For example, the URLs can be
http://example.com/{param1}
http://example.com/{param1}/constant/{id}
http://example.com/{param1}/{param2}/constant/{id}
http://example.com/{param1}/{param2}
http://example.com/{param1}/{param2}/{param3}
http://example.com/{param1}/{param2}/{param3}/constant/{id}
etc
How do I construct my routing module for these kind of URLs?