Guid / Uuid / Routing / Url Manager

This is just as an FYI, it took me a while to figure this out so I thought I would create a forum post to help someone else in the future.

I use UUID’s for my primary key. Not an issue until you create a URL like:

You expect Yii to assign the UUID to $id… Well you can with these routing rules:

'<controller:\w+>/<id:[\w-]+>' => '<controller>/view',

'<controller:\w+>/<action:\w+>/<id:[\w-]+>' => '<controller>/<action>',

Hopefully this helps someone!

credit goes here:

[color="#006400"]/* moved from General Discussion :) */[/color]