title: yii's 404 error page directs to custom default page
body: <p>i always get the default page, my default custom page, but it doesn't go to my 404 page... and main config is directing to site/error. And the below is my site/error. What else am I missing?</p>
  
  <pre><code>public function actionError()
      {
          $this-&gt;layout = '/layouts/main';
          $error = Yii::app()-&gt;errorHandler-&gt;error-&gt;code;
          if(404==Yii::app()-&gt;errorHandler-&gt;error-&gt;code){
              $this-&gt;render('404');
          }
          else
              $this-&gt;render('error', array('error'=&gt;$error));
      }
  </code></pre>