首先,配置了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;
	}
}

© 本文著作权归作者所有。转载请联系授权,禁止商用。