【问题标题】:I need to convert apache rewrite to nginx我需要将 apache 重写转换为 nginx
【发布时间】:2012-09-02 09:03:10
【问题描述】:

我需要将 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]

【问题讨论】:

    标签: apache mod-rewrite nginx


    【解决方案1】:

    http://nginx.org/en/docs/http/ngx_http_rewrite_module.html这个页面解释了如何使用nginx rewrite。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-06-18
      • 2014-11-10
      • 1970-01-01
      • 1970-01-01
      • 2015-02-19
      相关资源
      最近更新 更多