Simplifying the URL
-
The URL for topics currently looks like
https://forum.com/topic/15/url-rewritesWe'd like to see
https://forum.com/url-rewrites
I haven't found a toggle in the admin side, nor did I see a plugin to accomplish this. Is this something that can be done simply? I kicked around the forum here and all of my searches generally ran into old config.json references which didn't seem to apply.
-
@etakmit Are you wanting this as a "one off" so that you could more easily share links to the post? If so there are two solutions that may be adequate for you. The first is the
nodebb-plugin-smoothshorts
plugin.I was using the smoothshorts plugin for a while but ran into a few issues with it. I believe the developer @rbeer has stopped development of it. He did do a tremendous amount of work on it though but as with all plugins as NodeBB advances the plugins tend to need work to stay current. This method results in URLs like https://yourForumDomain.com/randomString
The second solution is something I cobbled together myself (with help from many on this site). It uses the YOURLS shortlink URL system as the backend and uses just a small amount of javascript and three lines added to one of the theme template files. This method results in URLs like https://aDifferentUrl.com/randomString
If you want me information about my little hack let me know. I did document it a fair amount in my original plea for help thread here: https://community.nodebb.org/topic/9712/post-tools-how-to-add-a-new-item
-
What I'm ultimately looking for is that URLs to posts are simply
Sadly I dont think either of your options quite fit although they're pretty close! Thank you!
-
@etakmit unfortunately, multiple posts can have the same title, so some kind of unique ID has to be included in the url. It could be the pid of the post, either prepended or appended to the URL, or something else.
-
@PitaJ said in Simplifying the URL:
@etakmit unfortunately, multiple posts can have the same title, so some kind of unique ID has to be included in the url. It could be the pid of the post, either prepended or appended to the URL, or something else.
Fair point!