![]() |
Automated redirect for old post/thread links
Folks,
Okay I have written some php code to automagically redirect old forum threads from shrapnelcommunity to the correct thread on forum.shrapnelgames.com. Essentially what I did when we migrated is I stored off the referential ID links between the following items between the new and old boards: Users Posts Threads Attachments Polls My plan is to use this data to one by one put in code to redirect (via the 404 call from apache) any incoming link for the above items to the new links in the new forum. This will resolve any old links in the forums and will also, over time, replace bad links on search engines. So far I have gotten this to work for threads and am working ont he other items. What I need is first off people to test that this works for threads. Keep in mind that means links to old threads, not individual posts. What I also need is links to some of the other items listed above so I have a testbed to work from with real links people still can find in old posts/links/etc. So far I have tested this with the old thread links in Ich's signature and those have worked. |
Re: Automated redirect for old post/thread links
Out of curiosity, why where the old ID values not simply preserved, and inserted into the vbulletin database? That would have made supporting the old link namespace a simple mod_rewrite rule.
Would it be too late to re-import ID values, thus absolving the need for such complex conversion scripts? |
Re: Automated redirect for old post/thread links
Quote:
So instead I took some code from the vb import author and extended it a little. |
Re: Automated redirect for old post/thread links
I am not sure if this is what you are looking for, but I pulled these links from one of my threads:
THREADS - appear to be working http://www.shrapnelcommunity.com/thr...b=5&o=&fpart=1 http://www.shrapnelcommunity.com/thr...&Number=528292 FILES - not found http://www.shrapnelcommunity.com/thr...?Number=580660 http://www.shrapnelcommunity.com/thr...?Number=585712 http://www.shrapnelcommunity.com/thr...?Number=591882 http://www.shrapnelcommunity.com/thr...?Number=592318 http://www.shrapnelcommunity.com/thr...?Number=614035 http://www.shrapnelcommunity.com/thr...?Number=629537 http://www.shrapnelcommunity.com/thr...?Number=632163 |
Re: Automated redirect for old post/thread links
This old image link is not working either:
http://www.shrapnelcommunity.com/thr...73-AomOrc3.JPG Edit: And here is an old link that used to go to the dom3 forums that gives me a permissions error instead of the page not found: http://www.shrapnelcommunity.com/thr...at=&Board=dom3 |
Re: Automated redirect for old post/thread links
Sounds like a great feature!
But my old embedded links do not seem to be working either, eg: http://www.shrapnelcommunity.com/thr...ev=#Post595147 Even this does not work: http://www.shrapnelcommunity.com/thr...?Number=595147 Is it because I'm not linking to the top thread? |
Re: Automated redirect for old post/thread links
I don't think he's gotten to the individual post redirects yet. Right now he's working on thread and trying to confirm it's working. But he will need other links to verify when he gets to the posts, so I am sure your links will be helpful.
|
Re: Automated redirect for old post/thread links
I think Richard must be making changes, because my threads don't redirect either vfb (but they did earlier). Otherwise, I imagine that your 2nd method would have worked.
Edit: Ah, Mindi. You are too fast! |
Re: Automated redirect for old post/thread links
Quote:
|
Re: Automated redirect for old post/thread links
Quote:
|
All times are GMT -4. The time now is 10:32 AM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.