404 ERROR on redirect

Hello!

I have a problem with " return Yii::$app->response->redirect(Url::to([’/site/login’]))->send()"
I try to make a function who make a validation and then redirect to another view, but when I use return Yii::$app->response->redirect(Url::to([’/site/login’]))->send(); i get ERROR404. I have login.php to the views/site

I’m not sure if i understand your problem, could you share the complete code of the controller ?

Does actionLogin() exist in your SiteController ?

1 Like