PDA

View Full Version : Fix/Redirect Old Forum Links to Their New Locations



FreeMemory
04-20-2017, 07:25 AM
PROBLEM
Links to old forum are still going to "404 Not Found" page
Example: https://forums.ddo.com/en/en/forums/forum.php?t=226992
This remains an unresolved issue from the forum website changeover years ago.

Players with some savvy can copy the number from the old link's URL, e.g. the "226992" from above
...then paste at the end of
"https://www.ddo.com/forums/showthread.php/"
...so that it looks like:
https://www.ddo.com/forums/showthread.php/226992
...then copy-paste that string into the browser address bar

But players shouldn't have to do all that and most players probably can't. DDO should have fixed this long ago, especially since it is rather simple.

SOLUTIONS
1) Insert a function/method on your "404 Not Found" page (or place it just prior to the code that sends incorrect links there) that will check the URL string for the substring "forums.ddo.com/en/en/forums/forum.php?t=". If true replace the substring "forums.ddo.com/en/en/forums/forum.php?t=" in the URL string with the substring "www.ddo.com/forums/showthread.php/" and then redirect to the entire new URL.
Now all old forum URLs go to their new URLs. This would allow old forum URLs from any website to be properly redirected.

2) Run "find & replace" on the entire website database. Find "forums.ddo.com/en/en/forums/forum.php?t=" and replace it with "https://www.ddo.com/forums/showthread.php/". This should fix all old-forum links throughout the forum. The additional benefits are that links will send less traffic to "404 Not Found" and links will be already corrected if users want to display or copy them without actually clicking them.

CONCLUSION
This should be a good day project for one of your junior developers with time to go home early. Once implemented, whenever a player clicks a link that originally had an old forum URL, it now works. Nobody will notice it, and that's just what we want - less unhappiness from old links not working. This will improve the website and finally make the changeover to "new" forum seamless.