Preventing Access A Url In Curlmanager [Solved]


I have a rule in CUrlManager as this:


Now i want prevent the user from accessing to site/signin directly. how can i do it? Do the following solution is a suitable way?


'site/signin'=>'signin' // This URL not exist and give a 404 error to user if the user want will access to [b]site/signin[/b] directly. 

What solution is suitable?

Not clear !!?

When the user requests this url website/site/singin, the URL not accessible for user. Only through website/signin URL the user can access to website/site/singin. In fact the user can only access to the defined pattern in CUrlManager rules(first post) and cannot access to website/site/singin directly.[b]


check if(Yii::app()->user->id) in site/index action, else redirect to signin

Excuseme, previous my post edited.

Solved here