Force custom routes?

Is there a way to force custom routes?

I have this in my config:


			'showScriptName' => false,

            'urlFormat' => 'path', 

            'rules' => array(




But on some places from the crud it will still redirect to




Is there a way to force all routes to only accept the custom route else redirect with a 301 error?


Mmm when I turn this on all url’s that are not defined give 404… Is there a way to just feed the custom urls to the DetailView widget and Grdview widget?

You should redirect to:

$this->redirect(array('books/view', 'id' => 10, 'slug' => 'mybook'));