...
|
...
|
@@ -24,9 +24,16 @@ module.exports = () => { |
|
|
case 'new': // 原新版 重定向到301
|
|
|
return res.redirect(301, helpers.urlFormat(req.url, null, 'www'));
|
|
|
case 'item':// 商品详情页
|
|
|
if (/\/p_([\d]+)(.*)/.exec(req.url) !== null) {
|
|
|
req.url = `/product/p_${RegExp.$1}${RegExp.$2}`;
|
|
|
if (/^\/p_/.test(req.url)) { // new
|
|
|
req.url = `/product${req.url}`;
|
|
|
}
|
|
|
|
|
|
if (/^\/product\/pro_/.test(req.url)) { // old
|
|
|
return res.redirect(301,
|
|
|
req.url.replace(/^\/product\/pro_([\d]+)_([\d]+)\/(.*).html(.*)/, '/p_$1.html$4')
|
|
|
);
|
|
|
}
|
|
|
|
|
|
break;
|
|
|
case 'guang': // 逛
|
|
|
case 'cdnsrcguang': // 逛CDN回源解析
|
...
|
...
|
|