You can also do this with rewrite rules. A rule like this in your config file:
'controller/<slug:[\w\-]+>'=>'controller/view',
will take a URL like this:
controller/my-slug
and it will redirect to the actionView() in your Controller, and pass the slug ("my-slug") in as a $_GET variable. With that rewrite rule you now call $_GET['slug'] and it will return "my-slug" from the url.
I have a "slug" row as a primary key so then I just query the DB for $_GET['slug'] in my actionView() and I get the correct record based on the URL. Works like a charm. Good luck!
UPDATE
To get rid of the controller prefix in addition to using a slug, you will probably need one large table to keep track of all url slugs (to prevent duplicates). If you have that, then you could do a couple of different things:
1 Override onBeginRequest to do a lookup on the master slug table to figure out which Controller to call.
2. Use a master rewrite to a single ActionIndex in the SiteController, and in that action look up the slug in the master table to figure out which controller/action to send the user to. The rewrite rule would look something like this:
'<slug:[\w\-]+>'=>'site/index',