I just made a plugin that probably fit your needs. If you already have a good solution for it, great. If not, this might help:
https://github.com/jenstornell/slash-redirect