response.writeHead(302, {'Location': '/account/login.html'});
response.end();
// In Express
router.get('*',function(req,res){
res.redirect('http://exmple.com'+req.url)
})
response.writeHead(301,
{Location: 'http://whateverhostthiswillbe:8675/'+newRoom}
);
response.end();
switch (req.url) {
case "/":
path += "index.html";
break;
case "/about":
path += "about.html";
break;
case "/about-us": // <--- redirection from /about-us to /about
res.statusCode = 301;
res.setHeader("Location", "/about");
res.end();
break;
default:
path += "404.html";
res.statusCode = 404;
}