custom 404 not found page

hi! i want to set up a 404 not found page that shows up on the $content area.

how do i do that?

put a test condition that when it fails the 404 error be echoed

eg.

if (!Yii::app()->user->isGuest){

     $this->redirect('admin/create')

}else

throw new CHttpException(404,‘error page not found’);

how about incorrent url inputs?. how do i do that?.. sorry i’m a noob.

You should configure in config/main.php errorHandler->actionError.

Read this page of the doc, 3rd chapter, display error with an action.

thank you very much!