Custom Paths



  • Hi,

    I would like to know if there is a feature/plugin for custom paths with NodeBB. I would like to reroute /category/1/CATEGORY_NAME to /CATEGORY_NAME. Is this possible?

    Thanks for your help!


  • Community Rep

    Not that I've seen. I think you can technically do this in your own plugin.

    You could fetch all of the category names at load time, then define the routes, using the same category controllers used in NodeBB core. It might be too complex if you've never written a plugin before however.

    I would then suggest adding a rewrite rule to your server config, so that requests to /category/1/CATEGORY_NAME are changed to /CATEGORY_NAME before they even reach NodeBB.



  • Thanks, I'll work on it and report here.


Log in to reply
 


Looks like your connection to NodeBB was lost, please wait while we try to reconnect.