I've moved Yii 1 website to a new Ubuntu server with NGINX and all works fine except cleaned URLs without index.php part. For example page http://****/site/about redirects to homepage but http://****/index.php/site/about shows correct page. My current server block configuration file contains this location rules:
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;
fastcgi_pass unix:/var/run/php5-fpm.sock;
}
I've also tried using
try_files $uri $uri/ /index.php$uri?$args;
but it end up with redirect loop.
Seems like rewrite /index.php$uri?$args never validates against $uri check.
In Yii config I have
'urlManager' => array (
'urlFormat' => 'path',
'showScriptName' => false,
'caseSensitive' => false,
'rules' => array (
'<public_url:about>'=>'site/about',
'<controller:\w+>/<id:\d+>' => '<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',
'<controller:\w+>/<action:\w+>' => '<controller>/<action>',
....
So the question is how to make http://****/site/about show same page as http://****/index.php/site/about request?
Thank you in advance.