Revive broken links on jmonkeyengine hub website

So, having been around this forum a bit, I’ve noticed that, at some point, the url structure for topics changed from
hub.jmonkeyengine.org/forum/topic/...
to
hub.jmonkeyengine.org/t/....

While I do like the new url structure (much cleaner), this left many links to other threads broken.
I’ve noticed however, that the content under the previous url structure was migrated, so only a change of /forum/topic/ to /t/ is all that is needed to load the old content.

Much of the old content, while, well… old, is still pretty useful.
For example, I can think of pauls amazing lemur gems. Quite dated, but very useful still. But the threads refer to the other gems in the old url structure, so a user not knowing about this could very well miss out on those gems.

While I don’t know how the website is structured nor the backend powering it, I do know my way around SEO and websites in general, and I have an easy (should be easy?) suggestion that would not only improve user experience but also improve the sites SEO ratings.

So, I’m suggesting that the website redirect the old url structure to the new one, so say redirect
http://hub.jmonkeyengine.org/forum/topic/lemur-gems-2-inputmapper-delegates/
to
http://hub.jmonkeyengine.org/t/lemur-gems-2-inputmapper-delegates/.

If the site is using expressjs somewhere in the backend, this is a simple middleware:

app.use((req, res, next) => {
    if(req.url.startsWith("/forum/topic/")) res.redirect(301,req.url.replace("/forum/topic/","/t/"));
    else next();
});
6 Likes

Unfortunately, there are also broken wiki links floating around too from multiple different wiki upgrades throughout the years.

Although it would be nice to have the redirect in place, I am not sure how that works with Discourse. Perhaps it has a builtin function for this? If there is an Apache proxy in place between the internet facing IP and the Discourse server, then it would be a simple rewrite rule. I am sure nginx has something similar if that is used instead of Apache. But there may also not be a proxy server in place at all, which I figure it highly likely (although my company exclusively uses proxy servers between our web apps and the internet as we have several rules we like to enforce for incoming connections and load balancing).

2 Likes

Is the backend database accessible? If so mass editing old forum posts might be an option?

2 Likes

Ya, I have noticed a few breeds of broken link out there, but the one I mentioned seems to be the most common, but a redirect for all would indeed be nice.

I haven’t ever used discourse, and I wasn’t aware that this site used discourse, but a google search found: Rediecting old forum urls to new discourse urls.

I don’t think a proxy server would be needed (unless one is already in place), but if one is already in place, then definitely a simple rewrite rule.

I don’t know how much overall support this will receive, but personally, I’m tired of clicking on dead links and having to rewrite them myself, and while I can just as easily write a firefox extension to do so for me, it’s a bit (a bit much) overkill for a few clicks on one singular website. And the UX and SEO boost are added bonuses to my cravings.

Maybe its my express background that has me expecting websites to be able to do backflips

1 Like

I should believe so, but I feel a database migration would be a bit overkill where a redirect would suffice.

Edit: but if a migration would be easier than implementing an odd redirect then I’m all for it. But I really think a 301 redirect is the best course of action for this

2 Likes

Ha, I don’t even know that we can access dead (or looking dead) links by changing part of URL,
So, this topic is already useful for users. Thanks

2 Likes

Glad it can help!