求高手帮忙把 apache 的重写规则转成 nginx 的重写规则<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ 7vbuy/index.php/$1 [L]
</IfModule>

解决方案 »

  1.   

    正则本身写法是一致的
    其他的,nginx里支持用if,所以就不用RewriteCond了,大概就是root /
    if (!-f $request_filename) {
        if (!-d $request_filename) {
            rewrite ^(.*)$ 7vbuy/index.php/$1 break;
        }
    }具体自己再根据情况调调吧,有个东西叫做“搜索引擎”自己动手,丰衣足食
      

  2.   

    哦,root 可能不对,根据你自己的目录进行修改,这里和RewriteBase的概念不太一样....