Forbidden In Url Containing "signin" Word [Solved]

I think you can use


$action = Yii::app()->getController()->getAction()->getId() or $this->getAction()->getId()

$id = Yii::app()->getRequest()->getQuery('id');

throw new CHttpException(404,Yii::t('yii','The system is unable to find the requested action "{$action}/{$id}");



Thanks dear friend,

I need to obtain previous controller/action. your code refer to current controller/action!

Hi my friend

What exactly you want? Do you want to redirect to previous controller/action of the current one?

Give me an example

We have in CUrlManager a rule such this:




'site/signin'=>'site/nopage',



Now i want site/nopage triggers an 404 HTTP exception with mention which of controller/action is not exist.

ok, comments the actionNopage method in your Site Controller. the site/signin will be routed to site/nopage tha is not exists. So errorHandler action catch the exception (actionError() in site Controller) and automatically displays which of controller/action is not exist.