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这种情况的发生

posted @ 2013-07-13 01:15  ecstore  阅读(794)  评论(0编辑  收藏  举报