.htaccess到nginx rewite

请帮我改变这个.htaccess到rginx rewite

RewriteRule ^show.php/(.*)$ show2.php?img=$1 [L] RewriteRule ^out.php/([az]{1})(.*)$ out2.php?$1=$2&%{QUERY_STRING} [L] RewriteRule ^view.php/(.*)$ view2.php?img=$1 [L] RewriteRule ^images.php/([az]{1})(.*)$ images2.php?$1=$2&%{QUERY_STRING} [L] RewriteRule ^gallery/([0-9]+)-([^/]*)/(.*)$ gallery.php?gal=$1&img=$3 [L] RewriteRule ^view/([0-9]+)-([^/]*)/(.*)$ gallery_body.php?gal=$1&img=$3 [L] 

我已经做了这些我的头顶,我无法testing他们:

你需要在/包含Nginx。

阿帕奇

RewriteRule ^show.php/(.*)$ show2.php?img=$1 [L]

Nginx的

Rewrite ^/show.php(.*)$ /show2.php?img=$1 last;

Nginx的查询string附加是隐含的,所以没有特殊的语法。

阿帕奇

RewriteRule ^out.php/([az]{1})(.*)$ out2.php?$1=$2&%{QUERY_STRING} [L]

Nginx的

Rewrite ^/out.php/([az]{1})(.*)$ /out2.php?$1=$2 last;

其余的规则似乎上面的变化。

安德鲁