我需要将apache重写转换为nginx

时间:2012-09-09 01:02:55

标签: apache mod-rewrite nginx

我需要将apache mod_rewrite规则转换为nginx 请帮忙!

Apache重写规则是:

RewriteEngine On
Options +FollowSymLinks

RewriteRule ^(.*).htm$ index.php?p=$1 [L]
RewriteRule ^(.*).html$ index.php?p=site&d=$1 [L]

RewriteRule ^images/w-([0-9]+)-(.*).*$ img/rsc.php?w=$1&ph=$2 [L]
RewriteRule ^images/h-([0-9]+)-(.*).*$ img/rsc.php?h=$1&ph=$2 [L]

1 个答案:

答案 0 :(得分:0)

http://nginx.org/en/docs/http/ngx_http_rewrite_module.html此页面介绍了如何使用nginx重写。