Is it possible in Yii UrlManager rules to set rule OR site/? For example there's "action Contacts in SiteController" and "controller MediController". Yii must use action from SiteController if it exists or user MediaController/index if not.
Asked
Active
Viewed 175 times
1 Answers
1
In UrlManager, It will search from Top to Down.
So upto my knowledge, you can not define two CONTROLLER/ACTION for same Url alias.
But you can use controller forward in siteController. If your condition not satisfy then forward to mediaController.
$this->forward('media/index');
Hope helps !!

Sanjay Mohnani
- 990
- 7
- 18
-
Its what I was writing :( +1 – Let me see May 15 '15 at 04:35
-
Yep, i just did it before saw your answer. Thx :) – Сергей Перенец May 15 '15 at 04:44
-
Still you should accept it as an answer so that it could guide others too :) – Let me see May 15 '15 at 10:05