express js redirect to url
window.location.href = "http://mywebsite.com/home.html";
express js redirect to url
window.location.href = "http://mywebsite.com/home.html";
express redirect to url
app.get('/', (req, res) => {
res.redirect('/about');
})
express redirect to url
app.get("/where", (req, res) => {
res.status(301).redirect("https://www.google.com")
}) //You need to include the status (301)
express redirect
app.get('/', (req, res) => {
res.redirect('/foo/bar');
});
express redirect
res.redirect('/foo/bar')
res.redirect('http://example.com')
res.redirect(301, 'http://example.com')
res.redirect('../login')
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us