SFML / SFML-Website

Repository for the SFML website.
Other
22 stars 35 forks source link

Old forum links without sub-domain fail in a 404 #148

Open eXpl0it3r opened 2 years ago

eXpl0it3r commented 2 years ago

Old forum links didn't point to the en.* sub-domain and as such will end up in a 404 page.

Example: http://www.sfml-dev.org/forum/viewtopic.php?p=36365#36365

tverrbjelke commented 1 year ago

What would the proper new link be? Simply http-> https and www->en subdomaining does not do the trick. like from Cannot draw text, linker errors in debug mode, other in rls

Has this link: http://www.sfml-dev.org/forum/viewtopic.php?p=36365#36365

https://en.sfml-dev.org/forum/viewtopic.php?p=36365#36365 Not sure what a "correct link" would be like.

eXpl0it3r commented 1 year ago

The new forum is at forums/ and it uses index.php for all the posts.
But even this doesn't work: https://en.sfml-dev.org/forums/index.php?topic=36365

I don't know exactly what the solution would be for it. I am hoping that there's a way to match this somehow in the database.

tverrbjelke commented 1 year ago

I see SFML uses https://wiki.simplemachines.org/smf/SMF2.0:Main_Page. I ll have a look into the installation and Database thing. Maybe I can dig slowly through it and understand what to do.

It will take some time for me (real live is happening in realtime), but who knows... mabye it's an easy fix.

eXpl0it3r commented 1 year ago

I just had another peek at the forum data and it doesn't seem like an easy redirect will do, because the ID in http://www.sfml-dev.org/forum/viewtopic.php?p=<id> refers to the message ID itself, which is different from the topic ID. But the new system doesn't have an "message ID" URL.

As such, we'll need to either have to write a viewtopic script that fetches the topic for a given message ID and builds a new URL, or consider replacing all the links in the database, so at least the forum in itself would be consistent, even if external links would still break.

Example:

https://en.sfml-dev.org/forums/index.php?topic=460.msg4458#msg4458 mentions http://www.sfml-dev.org/forum/viewtopic.php?p=4440#4440 which actually refers to this post: https://en.sfml-dev.org/forums/index.php?topic=676.msg4440#msg4440
Not the .msg4440#msg4440 at the end of the URL, but without the preceding topic ID 676, the link doesn't work.