/** * 商品详情页部分商品名称重置,防止express内部decodeURIComponent不能解析url出错 * @author: xuqi<qi.xu@yoho.cn> * @date: 2016/8/23 */ module.exports = function(req, res, next) { if (/^\/product\/pro_/.test(req.url)) { req.url = req.url.replace(/\/pro_([\d]+)_([\d]+)\/(.*)/, '/pro_$1_$2/yoho-replace.html'); } next(); };