轻风php 发表于 2011-3-14 10:00:09

Nginx rewrite 与apache转换

本帖最后由 轻风php 于 2011-3-14 10:21 编辑

大家好,本地是apache 买了个vps 是nginx 重写不会了
本地apache 中的.htaccess

RewriteEngine on
RewriteCond $1 !^(index\.php|test|public|user_guide|edit|pages|include|upload|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1



现在已经转成

rewrite ^(.+)$ /index.php?/$1 last;



但不知道条件怎么转?
谢谢
问题已解决


if ($request_uri ~* "^/(public|test)/.*"){

set $rule'1';
}

if ($rule !~ '1'){

rewrite ^/(.+)$ /index.php?/$1 last;
}
页: [1]
查看完整版本: Nginx rewrite 与apache转换