fastadmin部署出现后台登录404[后台不能伪静态的处理方式]

首先,配置了thinkphp的伪静态。

配置没问题,但依然404,就试一下以下方法。

测试
http://127.0.0.1/ZePSxxxxr.php?s=/index/login
成功打开,估计是伪静态的问题。

在nginx配置文件中添加以下配置项,针对ZePSxxxxr的。

location ^~ /ZePSxxxxr.php/ {  
	if (!-e $request_filename){
    	rewrite  ^\/ZePSxxxxr\.php(.*)$  /ZePSxxxxr.php?s=$1 last;   break;
    }
} 
location / {
	if (!-e $request_filename){
		rewrite  ^(.*)$  /index.php?s=$1  last;   break;
	}
}

Was this helpful?

0 / 0

发表回复 0