...
|
...
|
@@ -16,7 +16,7 @@ module.exports = [ |
|
|
origin: /^\/product\/pro_([\d]+)_([\d]+)\/(.*).html(.*)/,
|
|
|
target: (req, match, p1, p2, p3, p4) => {
|
|
|
req.mobileUrl = `${MOBILE_DOMAIN}/product/pro_${p1}_1/1.html${p4 ? p4 : ''}`;
|
|
|
return helpers.urlFormat(`/product/${p1}.html${p4}`, null, 'www');
|
|
|
return helpers.urlFormat(`/p${p1}.html${p4}`, null, 'item');
|
|
|
}
|
|
|
},
|
|
|
|
...
|
...
|
@@ -24,7 +24,7 @@ module.exports = [ |
|
|
{
|
|
|
type: TYPE.redirect,
|
|
|
origin: /^\/product\/pro_([\d]+)(.*)/,
|
|
|
target: (req, match, p1, p2) => helpers.urlFormat(`/product/${p1}.html${p2 ? p2 : ''}`, null, 'www')
|
|
|
target: (req, match, p1) => helpers.urlFormat(`/p${p1}.html`, null, 'item')
|
|
|
},
|
|
|
|
|
|
// 商品详情页老链接
|
...
|
...
|
@@ -33,7 +33,7 @@ module.exports = [ |
|
|
origin: /^\/p([\d]+).html(.*)/,
|
|
|
target: (req, match, p1, p2) => {
|
|
|
req.mobileUrl = `${MOBILE_DOMAIN}/product/pro_${p1}_1/1.html${p2 ? p2 : ''}`;
|
|
|
return helpers.urlFormat(`/product/${p1}.html${p2 ? p2 : ''}`, null, 'www');
|
|
|
return `/product${req.url}`;
|
|
|
}
|
|
|
},
|
|
|
|
...
|
...
|
|