Hide Site Controller, And Access Users Controller Default Action

I think I’ve read all of the topics about this, and have yet to get an answer on this.

My url rules:

'<page:\w+>' => 'site/<page>',

'<c:\w+>/' => '<c>',

'<c:\w+>/<id:\d+>' => '<c>/view',

'<c:\w+>/<a:\w+>/<id:\d+>' => '<c>/<a>',

'<c:\w+>/<a:\w+>' => '<c>/<a>',

This works great for my site controller.

However, I want to access my “Users” controller via it’s default action, i.e


However, this gets caught up in the rule meant for my site controller, and there is no ‘users’ action in my site controller, so the path is not found. “users/index” works, but I don’t want to have to go to “users/index”, I’m just stubborn like that.

So. If you don’t want to have users/index what will your default action be?

And does www.foo.com/users/ work with your rules? It it forwarded to your users/index.php view?

If you don’t want the trailing slash to be mandatory, you can also try with

'users' => 'users/index',

'<page:\w+>' => 'site/<page>',


@waitforit - the default action is index, so I want /users to be routed to /users/index. However, when I go to /users , this gets routed to /site/users, which doesn’t exist.

@bennouna - Nope, /user gets routed to /site/users, which doesn’t exist. With or without the slash, it’s the same result.

/<c:\w+>/index works fine. I just want to go to <c:\w+> and be directed to <c:\w+>/index.

Thanks, guys.