求高手帮忙把 apache 的重写规则转成 nginx 的重写规则<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ 7vbuy/index.php/$1 [L]
</IfModule>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ 7vbuy/index.php/$1 [L]
</IfModule>
其他的,nginx里支持用if,所以就不用RewriteCond了,大概就是root /
if (!-f $request_filename) {
if (!-d $request_filename) {
rewrite ^(.*)$ 7vbuy/index.php/$1 break;
}
}具体自己再根据情况调调吧,有个东西叫做“搜索引擎”自己动手,丰衣足食