1,
app.get(‘/NUP‘, function(req, res, next) { var form = fs.readFileSync(‘public/NodeUP/index.html‘, { encoding: ‘utf8‘ }); res.send(form); // 重定向到百度 // res.redirect("https://www.baidu.com"); });
NodeJS_0011:nodejs重定向到一个链接或本地的页面的方法
原文:https://www.cnblogs.com/eliteboy/p/13284406.html