Код: Выделить всё
<?php
namespace app\controllers;
use Yii;
use yii\web\Controller;
class SiteController extends Controller
{
public function actionError() {
return $this->redirect('http://www.google.com/');
}
}
- yii2 2.0.6 срабатывает корректно: происходит переход на http://www.google.com/ (Ststus Code 302, Location: http://www.google.com)
- yii2 2.0.7 не срабатывает (Status Code 404, Location отсутствует)
Код: Выделить всё
'errorHandler' => [
'errorAction' => 'site/error',
],