Route Handling

I have a feeling there’s a simple answer to this, but…

For the most part, my site is handled via the traditional controller/view (e.g. site/index) route handling. However, if the user requests a route without the controller, I want that passed to another controller/view.

Example:

If they request: site.com/site/index, it should continue to route to site/index

If, however, they request: site.com/brenda , it should route to site/profile/brenda

Any simple solutions? Thank You!

UPDATE: OK, I think I figured out how to do this…

I added a line in the urlManager rules:

‘<id:\w+>’ => ‘user/profile’,

Then in the userController, I added a function actionProfiler, that retrieves the get parameter ($sName = yii::$app->request->get(‘id’);)