Authored by htoooth

fix

@@ -33,17 +33,17 @@ module.exports = [ @@ -33,17 +33,17 @@ module.exports = [
33 origin: /^\/p([\d]+).html(.*)/, 33 origin: /^\/p([\d]+).html(.*)/,
34 target: (req, match, p1, p2) => { 34 target: (req, match, p1, p2) => {
35 req.mobileUrl = `${MOBILE_DOMAIN}/product/pro_${p1}_1/1.html${p2 ? p2 : ''}`; 35 req.mobileUrl = `${MOBILE_DOMAIN}/product/pro_${p1}_1/1.html${p2 ? p2 : ''}`;
36 - return `/product${req.url}`; 36 + return helpers.urlFormat(`/product/${p1}.html${p2 ? p2 : ''}`, null, 'www');
37 } 37 }
38 }, 38 },
39 39
40 // 商品详情页新链接 40 // 商品详情页新链接
41 { 41 {
42 - type: TYPE.rewrite, 42 + type: TYPE.redirect,
43 origin: /^\/([\d]+).html(.*)/, 43 origin: /^\/([\d]+).html(.*)/,
44 target: (req, match, p1, p2) => { 44 target: (req, match, p1, p2) => {
45 req.mobileUrl = `${MOBILE_DOMAIN}/product/${p1}.html${p2 ? p2 : ''}`; 45 req.mobileUrl = `${MOBILE_DOMAIN}/product/${p1}.html${p2 ? p2 : ''}`;
46 - return `/product${req.url}`; 46 + return helpers.urlFormat(`/product${req.url}`, null, 'www');
47 } 47 }
48 } 48 }
49 ]; 49 ];