...
|
...
|
@@ -24,13 +24,13 @@ module.exports = () => { |
|
|
case 'new': // 原新版 重定向到301
|
|
|
return res.redirect(301, helpers.urlFormat(req.url, null, 'www'));
|
|
|
case 'item':// 商品详情页
|
|
|
if (/^\/p_/.test(req.url)) { // new
|
|
|
if (/^\/p([\d]+)/.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')
|
|
|
req.url.replace(/^\/product\/pro_([\d]+)_([\d]+)\/(.*).html(.*)/, '/p$1.html$4')
|
|
|
);
|
|
|
}
|
|
|
|
...
|
...
|
|