php - Yii UrlManager Action OR Controller -


is possible in yii urlmanager rules set rule or site/? example there's "action contacts in sitecontroller" , "controller medicontroller". yii must use action sitecontroller if exists or user mediacontroller/index if not.

in urlmanager, search top down.

so upto knowledge, can not define 2 controller/action same url alias.

but can use controller forward in sitecontroller. if condition not satisfy forward mediacontroller.

$this->forward('media/index'); 

hope helps !!


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -