Merge branch 'feature/seo2' of git.yoho.cn:fe/yohobuywap-node into feature/seo2
Showing
1 changed file
with
7 additions
and
3 deletions
@@ -314,15 +314,19 @@ const indexRedirect = (req, res, next) => { | @@ -314,15 +314,19 @@ const indexRedirect = (req, res, next) => { | ||
314 | if (id) { | 314 | if (id) { |
315 | let redirectUrl = '/guang/'; | 315 | let redirectUrl = '/guang/'; |
316 | 316 | ||
317 | - if (req.yoho.channel !== req.cookies._Channel) { | ||
318 | - redirectUrl += `${req.yoho.channel}-`; | ||
319 | - } | 317 | + // if (req.yoho.channel !== req.cookies._Channel) { |
318 | + // redirectUrl += `${req.yoho.channel}-`; | ||
319 | + // } | ||
320 | + | ||
320 | delete req.query.id; | 321 | delete req.query.id; |
322 | + delete req.query.channel; | ||
323 | + | ||
321 | let param = qs.stringify(req.query); | 324 | let param = qs.stringify(req.query); |
322 | 325 | ||
323 | if (param) { | 326 | if (param) { |
324 | param = '?' + param; | 327 | param = '?' + param; |
325 | } | 328 | } |
329 | + | ||
326 | redirectUrl += `${id}.html${param}`; | 330 | redirectUrl += `${id}.html${param}`; |
327 | res.redirect(301, redirectUrl); | 331 | res.redirect(301, redirectUrl); |
328 | } else { | 332 | } else { |
-
Please register or login to post a comment