Url manager default rules

What are the default url rules for url manager ?

When you access www.app.com/controller/action obvious the rule is


but it isn’t written anywhere, so i was wondering what are the rules Yii applies when nothing in the rules array defined by the app ?

The URL rules are just used to normalize the route for the requested page, so that Yii ends-up with a standard "[<module>/]<controller>/<action>" route, which is then cut-up in CWebApplication::createController().

In addition, there is a default controller if none is specified (in the method specified above):





Each controller also has a default action defined on it.

Together, these emulate the existence of those default rules, but Yii doesn’t actually doesn’t require any, unless you want to shorten your URLs, lock them down, or make them simpler.

Dustin Oprea