Hello everyone!
I’m experiencing a problem with yii2 debug module: when i’m trying to load http://gs-test.ru/game/index, i get a message like that: “Not Found (#404): Unable to resolve the request: game/null”.
Interesting point is that after F5 debug module is loaded correctly, BUT if i select address field and hit "Enter", the problem is still there.
That problem appears only on game/index path, but controller and action themselves are passed without any errors.
There are some code parts, which could appear to be problematic (i can imagine, that the problem is with redirecting from site/index):
site/index, which is redirecting logged users to game/index
public function actionIndex()
{
if(Yii::$app->user->isGuest)
{
return $this->render('index');
}
else
{
return $this->redirect(['/game/index']);
}
}
main-local config
$config['modules']['debug'] = [
'class' => 'yii\debug\Module',
'allowedIPs' => ['*my ip there*'],
];
urlManager
'urlManager' => [
'enablePrettyUrl' => true,
'showScriptName' => false,
],
.htaccess
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
Thanks for any ideas!