A
A
akula222017-02-27 23:46:56
Yii
akula22, 2017-02-27 23:46:56

Why did redirect stop working?

public function actionLogin()
{
return $this->redirect(['/']);
}
White screen, nothing in the logs, debug enabled
On the local server everything works,
on the working server I write a redirect to any action and it does not work

return Yii::$app->getResponse()->redirect(['/backend/pages/index']);
$this->redirect(['/']);

it doesn't work either way

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2017-03-01
@webinar

as I understand it, because return is missed
return $this->redirect(['/']);- there will be a redirect
$this->redirect(['/']);- there will be a white screen
White screen - 98% return is missed in the action

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question