Authored by 周少峰

Merge branch 'feature/seoUrl'

... ... @@ -296,7 +296,7 @@ const getPackage = (req, res, next) => {
};
const redirectNewRouter = (req, res) => {
return res.redirect(301, helpers.urlFormat(`/p${req.params[0]}.html${req.params[2]}`, null, 'item'));
return res.redirect(301, helpers.urlFormat(`/p${req.params[0]}.html${req.params[3]}`, null, 'item'));
};
module.exports = {
... ...
... ... @@ -62,7 +62,7 @@ router.get('/outlets/:channel', outlets.channel); // 奥莱频道页
// 商品分类列表页
router.get('/list', outletsList.index);
router.get(/\/pro_([\d]+)_([\d]+)\/(.*)/, detail.redirectNewRouter); // 老的商品详情routers
router.get(/\/pro_([\d]+)_([\d]+)\/(.*).html(.*)/, detail.redirectNewRouter); // 老的商品详情routers
router.get(/\/p([\d]+)(.*)/, detail.showMain); // 新的商品详情routers
router.get('/detail/comment', detail.indexComment); // 商品评论
router.get('/detail/consult', detail.indexConsult); // 商品咨询
... ...