Bookmarks and search engine links to old v2 forum

Ics19

belle macchine!
Apologies if I've missed something as been away a while, but following on from EricH in https://xwebforums.com/forum/index.php?threads/welcome-to-xweb-v3.31413/page-2#post-264222
is there a plan to map the old .org urls to the new .com equivalent?

It looks like everything is in place, just missing the final "link" in the chain (no pun intended), eg: the old thread for cam tool specs was:
http://xwebforums.org/showthread.php?t=19180
so as the forum is now offline, could a new php script be added to replace the old showthread.php file which does a simple redirect based on the t= parameter to the new page, ie:
http://xwebforums.com/forum/index.php?threads/19180/

This would keep people happy who have bookmarks setup and perhaps importantly allow slow to catch-up search engines to still link (althrough a see google is getting there). Once you map the two domains together, there's no reason why you couldn't keep the showthread.php in place.

Good work on migrating the same thread id over BTW :), although i'm not sure the post id's from v2 to v3 are the same so handling the p= parameter may not be quite as easy?
 
I spent a fair amount of time finding and updating these through conversion scripts. That got maybe 98% of embedded links. The remainder didn't match the various RegExs I used. Are the one you're seeing linkified tetxt perhaps?
 
No, sorry, I didn't mean embedded 'old' links in posts, I can see you did a great job sorting them. What I meant was v2 forum links stored outside of the v3 forum control, ie browser bookmarks that people have stored for handy topics, links in other forums that point back to xweb pages, search engine caches, previous mentions to xweb that people over time must have included in emails etc. All of these are now effectively broken, but it would seem they might be simple way to tie them back together as you've done the hard bit by migrating the same thread id across?
 
No, sorry, I didn't mean embedded 'old' links in posts, I can see you did a great job sorting them. What I meant was v2 forum links stored outside of the v3 forum control, ie browser bookmarks that people have stored for handy topics, links in other forums that point back to xweb pages, search engine caches, previous mentions to xweb that people over time must have included in emails etc. All of these are now effectively broken, but it would seem they might be simple way to tie them back together as you've done the hard bit by migrating the same thread id across?

Ahh, understood now. Agreed it's a problem that could be solved with a redirect. xwebforums.org is still pointing at the old site, primarily to keep the wiki alive until that can be migrated over (there are some complications with that due to old software, outdated schema and php versions). As soon as I can get that content properly on board here, the old host will go away and the old URL can be repointed here, with whatever tweaking is needed to get to the right location..
 
OK, I see you've got a plan. I just thought that as public v2 forum access was not needed any more, then the showthread.php on the old server could be tweaked now as it looks to be separate from the wiki - the php code would likely be the same even when moved to the new host once the domains merged?
 
I was thinking something simple along the lines of:
Code:
<?php
// showthread.php - redirect from xweb v2 to v3 using thread parameter, eg:
// OLD http://xwebforums.org/showthread.php?t=19180
// NEW https://xwebforums.com/forum/index.php?threads/19180/
$location = "https://xwebforums.com/forum/index.php";
$thread = $_GET["t"];
if (isset($thread) && (int)$thread > 0) {
    $location .= "?threads/" . (int)$thread . "/";
}
header("HTTP/1.1 301 Moved Permanently");
header("Location: " . $location);
?>

You could extend it to also cater for the 'p' param for post entries, but I don't think there's a direct mapping between old and new based on some bookmarks I've got - you'd need to build some sort of lookup mapping and that may not be worth it. To just do the thread redirect would be great though :)
 
Fantastico! Your code worked exactly as intended. I've dropped that onto the old server so lingering thread URLs should all redirect now. The post URLs were actually carried over too, so I used your model to write a showpost.php and that seems to work as well.

Thanks for providing such a simple and effective fix, and for persevering when I didn't get your point :rolleyes: Let me know if you come across instances that are still broken.
 
Yepp, looks good, I've tested the following ok for old v2 urls containing the t= thread parameter:
What didn't seem to work was a couple of bookmarks I had for p= post entries, eg:
http://xwebforums.org/showthread.php?p=220406
which was originally to one of the posts in thread https://xwebforums.com/forum/index.php?threads/soliciting-for-opinion-very-pointed-question.26464/
I can't see where v2 post 220406 now maps in v3 and how that fits in with your showpost.php, but hey I'm happy with t's :)
 
Yepp, looks good, I've tested the following ok for old v2 urls containing the t= thread parameter:
What didn't seem to work was a couple of bookmarks I had for p= post entries, eg:
http://xwebforums.org/showthread.php?p=220406
which was originally to one of the posts in thread https://xwebforums.com/forum/index.php?threads/soliciting-for-opinion-very-pointed-question.26464/
I can't see where v2 post 220406 now maps in v3 and how that fits in with your showpost.php, but hey I'm happy with t's :)

I think i've covered that now too. Looks like in some cases, showthread was called with a post param rather than calling showpost. Now checking for both.
 
Well done for the mod - I've checked a couple of p= bookmarks and they end up at the matching thread, so that's all good.
 
Back
Top