url manager trailing slash on module url

Hello, today i got issue with my project, and i cant get past it - I created few url rules, and they work nice except situation where i have controller given from module. for example: http://localhost/settings/default/create doesn’t work, until i add ‘/’ at end of url.

i found out that these two rules are conflicting with each other:




            '<shop:\w+>/<controller:\w+>/<action:\w+>' => '<controller>/<action>',

            '<module:\w+>/<controller:\w+>/<action:\w+>' => '<module>/<controller>/<action>',



explaination: on my content controllers i need param from url such as shop to determine what part of site should be loaded, on moderation side there is no need to pass this param.

anyone have idea about solution to this?

You have a finite and probably small number of modules so their ids can be hardcoded in rules:




 '<module:(module-one-id|module-two-id|module-three-id)>/<controller:\w+>/<action:\w+>'  => '<module>/<controller>/<action>',

'<shop:\w+>/<controller:\w+>/<action:\w+>' => '<controller>/<action>',