猿问

yii2 参数路径化 失败


lnmp+yii2来部署我的项目,我想讲参数路径化,也就是localhost/login/login/id/2/xxx/xxx.html
但是失败了,不知道原因在哪里,这是我的nginx配置,和yii2的main文件配置,
  location / {
         #   root   html;
		   index  index index.html index.htm index.php;
			try_files $uri $uri/ /index.php?$args;
        }

 location ~ .*\.php {
        #    root           html;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
			fastcgi_split_path_info ^(.+\.php)(.*)$;
            fastcgi_param   PATH_INFO $fastcgi_path_info;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            include        fastcgi_params;
        }

main.php配置:
'urlManager' => [
	       'class' => 'yii\web\UrlManager',
	       'enablePrettyUrl' => true,
	       'enableStrictParsing' => false,  //不启用严格解析
	       'showScriptName' => false,
	       'suffix' => '.html',
	       'rules' => [
			   
		       ],
        ],
弄了一下午了,还是不知道原因,跪求各位大神帮忙


阿甘_0005
浏览 1428回答 0
0回答
随时随地看视频慕课网APP
我要回答