我想知道如何在Nginx中翻译Apache“ RewriteMap”指令.
我在Nginx在线文档中什么都没找到
我当前的apache代码是:
RewriteMap map-one txt:C:/map-one.txt
RewriteMap map-two txt:C:/map-two.txt
<Directory />
Options All
AllowOverride All
RewriteEngine On
RewriteRule /MYSITE/PRODUCT/([A-Za-z0-9-]+)/([A-Za-z0-9-]+),([0-9]+).aspx /$1/$2/${map-two:$3}/${map-one:$3} [R=301,L]
</Directory>
任何想法 ?
最佳答案
检查Nginx HTTP Map Module
原文链接:https://www.f2er.com/nginx/532410.htmlmap $uri $new {
default http://www.domain.com/home/;
/aa http://aa.domain.com/;
/bb http://bb.domain.com/;
/john http://my.domain.com/users/john/;
}