Ecstore Nginx Rewrite,去掉链接中的index.php ECSTORE 伪静态

一、修改 nginx.conf文件,添加如下代码:

 if ($request_uri ~ (.+?\.php)(|/.+)$ ){
                break;
                }

                if (!-e $request_filename) {
                rewrite ^/(.*)$ /index.php/$1 last;
                }

二、修改配置文件:

define('WITH_REWRITE',true);
重启nginx
补充说明
if ($request_uri ~ (.+?\.php)(|/.*)$ ){
break;
}
是为避免当出现类似.../index.php/这种url的时候能够很好的解决502这种情况的发生。