Hi
I made a basic app with Yii2 and then uploaded it on a webhost. Then to remove web folder from address, move everything one level upper. Now in public_html I have everything has been in web folder before and other folders are outside of public_html.
My problem is redirect doesn’t work totally. Even in such a simple situation:
<?php
namespace app\modules\newsletter\controllers;
use Yii;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
class TestController extends Controller
{
public function actionIndex()
{
echo 'Hi';
return $this->redirect(I TESTED MANY URLS);
}
}
I can see ‘Hi’ but redirect doesn’t occur. I checked the
Yii::$app->response->i_sent
and that is true after redirect!