nginx:[emerg]冲突参数(使用nginx / map进行质量重定向)

时间:2017-06-05 18:45:55

标签: redirect nginx

我正在将旧网站迁移到新平台。我有一个巨大的网址列表转发到新的网址。我实现这一点的方式基于this回答:

map_hash_bucket_size 256; # see http://nginx.org/en/docs/hash.html

map $request_uri $new_uri {
    include /etc/nginx/oldnew.map; #or any file readable by nginx
}

server {
    listen       80;
    server_name  your_server_name;

    if ($new_uri) {
       return 301 $new_uri;
    }

    ...    
}

/etc/nginx/oldnew.map

... other links ...
/Catalogue/Navigate/category-paints-thinners    /parts-by-category/paint-accessories.html;
/Catalogue/Navigate/category-paints-thinners?catalogueLevelItemID=87529237-3f1f-4e4e-aedd-ac48c4deb5cd  /parts-by-category/paint-accessories.html;
... other links ...

当我启动nginx服务器时,我收到此错误:

  

nginx [32448]:nginx:[emerg]冲突参数   " /目录/导航/类涂料-稀释剂"在   /etc/nginx/conf.d/redirects.map:4993

知道导致此错误的原因是什么?是查询字符串吗?如果是这样,你怎么处理它?<​​/ p>

0 个答案:

没有答案