URL Rewriting with ExpressJS

前端 未结 5 1361
灰色年华
灰色年华 2020-12-05 04:37

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

5条回答
  •  清歌不尽
    2020-12-05 04:58

    Try this:

    app.get('/toto', function(req, res) {
      res.redirect('/heytoto');
    });
    

提交回复
热议问题