No Error Page

Hi,

When going to an wrong URL (like www.example.com/siteeee/blabla/) with a non existing controller and/or action, I get a: CHttpException You are not authorized to perform this action (\framework\web\auth\CAccessControlFilter.php:182).

And not a error page. Why is that?

In my config:


		'urlManager'=>array(

			'urlFormat'=>'path',

			'showScriptName'=>false,

			'caseSensitive' => false,	

			'urlSuffix' => '.html',	

			'rules'=>array(					

				'<controller:\w+>/<id:\d+>'=>'<controller>/view',

				'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',

				'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',

			),

		),



and


		'errorHandler'=>array(

			'errorAction'=>'site/error',

		),



in my site controller:


		'errorHandler'=>array(

			'errorAction'=>'site/error',

		),



Be sure to set access for all user types to error action in site controler.

accessRules…!

Crap, I had this in my main Controller in Components, but this is off course overruled by the accessRules in the SiteController.

So I’ve added the error action to the SiteController.




	public function accessRules()

	{   

		return array(

			// Guests allow.

			array('allow',  

				'actions'=>array('index','...','error'),

				'users'=>array('*'),

			),			

			// Deny all safety.

			array('deny',  

				'users'=>array('*'),

			),

		);

	}




Thanks a lot Lightning McQueen!

Nice, thanks…