Skip to content

Commit

Permalink
redirect Wayback
Browse files Browse the repository at this point in the history
  • Loading branch information
rosano committed Feb 28, 2024
1 parent 4178633 commit 47a9439
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,8 @@ app.use(function redirectGhost (req, res, next) {
return res.redirect(301, 'https://utopia.rosano.ca/' + (match || ''));
});

app.get('*', function redirectWayback (req, res) {
return res.redirect(308, `https://web.archive.org/web/https%3A%2F%2F` + req.get('host') + req.url);
});

app.listen(process.env.PORT);

0 comments on commit 47a9439

Please sign in to comment.