I’m trying to follow the custom rule class tutorial and managed to get it to create the url i want which looks like this
localhost/make/model/year
originally it would looks like this
[b]localhost/abc/research/?make=make&model=model&year=year[/b]
my urlmanager
// a custom rule to handle '/Manufacturer/Model'
array(
'class' => 'site.common.extensions.UrlManager.CarUrlRule',
'connectionID' => 'db',
),
//url manager for abc module
'research/<action:(view|photos|consumer-reviews|all)>' => '/abc/research/<action>',
'<action:(research)>' => '/abc/<action>',
now when i go to
[b]localhost/make/model/year[/b]
i get this error
Error 400
Your request is invalid.
here is my action function in my controller
public function actionView($id)
{
$this->render('view',array(
'model'=>$this->loadModel($id),
));
}
any ideas how to fix this? Thanks