I would like to rewrite my URLs on my ExpressJS website. I\'ve used this plugin, https://github.com/joehewitt/express-rewrite, but it doesn\'t work...
However, I mig
You could rewrite the URL before you get to the handler you want to use.
app.use(function(req, res, next) { if (req.url === '/toto') { req.url = '/heytoto'; } next(); }); app.get('/heytoto', ...);
I've used a similar method to do URL rewrites with regular expressions.