Hi,
I have 2 modules: frontend and backend, nothing else.
I want to use frontend as a default module,without having to show it in the URL.
For example, I want http://myapp/search/index to route to /frontend/search/index
Thanks a lot !
Hi,
I have 2 modules: frontend and backend, nothing else.
I want to use frontend as a default module,without having to show it in the URL.
For example, I want http://myapp/search/index to route to /frontend/search/index
Thanks a lot !
Hi,
I think you should utilize CUrlManager application component.
That’s what I use. The rules I talk about are the rules of CUrlManager.
Could you please provide you current URL rules ?
I have solved my problem with the 2 last rules.
'rules'=>array(
// Gii
'gii'=>'gii',
'gii/<controller:\w+>'=>'gii/<controller>',
'gii/<controller:\w+>/<action:\w+>'=>'gii/<controller>/<action>',
'<module:\w+>/<controller:\w+>/<id:\d+>'=>'<module>/<controller>/view',
'<module:\w+>/<controller:\w+>/<action:\w+>/<id:\d+>'=>'<module>/<controller>/<action>',
'<module:\w+>/<controller:\w+>/<action:\w+>'=>'<module>/<controller>/<action>',
'<controller>/<action:\w+>'=>'frontend/<controller>/<action>',
'<controller>'=>'frontend/<controller>',
),