Такое поведение только на nginx + PHP-FPM, на апаче все работает правильно.
настройки nginx
Код: Выделить всё
...
location / {
index index.php index.html;
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
set $fsn /index.php;
if (-f $document_root$fastcgi_script_name){
set $fsn $fastcgi_script_name;
}
fastcgi_pass 127.0.0.1:9123;
fastcgi_read_timeout 300;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fsn;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
...
app.log:
Код: Выделить всё
[проверка правил пропущена]
2017-05-09 11:04:53 [127.0.0.1][2][-][trace][yii\web\UrlManager::parseRequest] No matching URL rules. Using default URL parsing logic.
2017-05-09 11:04:53 [127.0.0.1][2][-][trace][yii\web\Application::handleRequest] Route requested: ''
2017-05-09 11:04:53 [127.0.0.1][2][-][trace][yii\base\Controller::runAction] Route to run: site/index
$_SERVER = [
...
'SCRIPT_FILENAME' => 'Z:/home/new/frontend/web/index.php'
'SERVER_SOFTWARE' => 'nginx/1.13.0'
'GATEWAY_INTERFACE' => 'CGI/1.1'
'REQUEST_SCHEME' => 'http'
'SERVER_PROTOCOL' => 'HTTP/1.1'
'DOCUMENT_ROOT' => 'Z:/home/new/frontend/web'
'DOCUMENT_URI' => '/test/index.php'
'REQUEST_URI' => '/test/index.php'
'SCRIPT_NAME' => '/test/index.php'
...
]
про enableStrictParsing знаю.