Hi All,
I am trying to create a catch-all rule at the very bottom of my CURLManager application instance so that anything that does not match the previous rules, will be handled by a particular module/controller/action.
After some research, I’ve stumbled into something along the lines of
'urlManager'=>array(
'urlFormat'=>'path',
"showScriptName"=>false,
'rules'=>array(
'admin'=>'user/user/login',
'admin/<controller:\w+>'=>'admin/<controller>',
'admin/<controller:\w+>/<id:\d+>'=>'admin/<controller>/view',
'admin/<controller:\w+>/<action:\w+>/<id:\d+>'=>'admin/<controller>/<action>',
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
''=>'frontend/page/index',
),
),
But the ‘’ at the end only works when there is nothing on the URL, e.g., no wildcards allowed.
If I replace the last line with
'(.*)/*'=>'frontend/page/index',
The catch-all functionality does work, but then the /admin, for instance, never gets matched.
Any advice or implementation ideas?
Cheers,
Cass