I need to rewrite this URL with Node:
/single.php?articleID=123
to this:
/article/123
This is because a company I work with already printed out QR codes with said URL for the old software. Now that their software got rewritten in Node, no QR code works anymore. How can I support this old URL with Node? I tried setting up a route for it:
app.get('/single.php?articleID=:id', log.logRequest, auth.checkAuth, function (request, reponse) {
response.send(request.params.id);
});
But it just responds this:
Cannot GET /single.php?articleID=12
Any ideas? Thanks.