You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, this module redirects /mypage to /mypage/. I'd like to do the reverse: redirect /mypage/ to /mypage. I prefer this method because 1) historically a trailing slash signifies a directory and 2) I just like the look of it better. This could be implemented with a config option like:
router.get('/mypage/', function (req, res) {
res.send('mypage');
});
This tells express (and the library) that your page is at /mypage/ and this is the main url, so it will add a trailing slash whenever somebody goes to the page /mypage.
You should change your route to this:
router.get('/mypage', function (req, res) {
res.send('mypage');
});
This way express will think about it as /mypage being the main url, so it will redirect /mypage/ to /mypage. This should solve your problem.
Currently, this module redirects
/mypage
to/mypage/
. I'd like to do the reverse: redirect/mypage/
to/mypage
. I prefer this method because 1) historically a trailing slash signifies a directory and 2) I just like the look of it better. This could be implemented with a config option like:The text was updated successfully, but these errors were encountered: