Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

express redirect to url

app.get("/where", (req, res) => {
   res.status(301).redirect("https://www.google.com")
}) //You need to include the status (301)
 
PREVIOUS NEXT
Tagged: #express #redirect #url
ADD COMMENT
Topic
Name
1+7 =