簡體   English   中英

NGINX / Apache RewriteMap

[英]NGINX / Apache RewriteMap

我想知道如何在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 $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/;
}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM