|
|
|
|
|
August 16th, 2008, 07:32 PM
|
|
Brigadier General
|
|
Join Date: Dec 1999
Location: Lancaster, OH 43130
Posts: 1,997
Thanks: 5
Thanked 9 Times in 8 Posts
|
|
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.
__________________
Change is inevitable, how you handle change is controllable - J. Strong
|
The Following User Says Thank You to Richard For This Useful Post:
|
|
August 16th, 2008, 08:12 PM
|
|
Shrapnel Fanatic
|
|
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
|
|
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?
|
August 16th, 2008, 08:18 PM
|
|
Brigadier General
|
|
Join Date: Dec 1999
Location: Lancaster, OH 43130
Posts: 1,997
Thanks: 5
Thanked 9 Times in 8 Posts
|
|
Re: Automated redirect for old post/thread links
Quote:
Originally Posted by Fyron
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.
|
The vb import process tries to do things in a very clean way and because of that assigns a new post id/thread id starting at zero. It does preserve a concept of an import ID. I had written something to update all of the postID/threadID's to the old numbers but the one sticking point was threaded mode. Due to the way the parent/child post setup in vb works there was no easy way via sql to update the posts without breaking the parent posts used for threaded mode.
So instead I took some code from the vb import author and extended it a little.
|
August 16th, 2008, 08:44 PM
|
|
Colonel
|
|
Join Date: May 2005
Location: Kansas, USA
Posts: 1,538
Thanks: 289
Thanked 194 Times in 94 Posts
|
|
Re: Automated redirect for old post/thread links
|
August 16th, 2008, 08:58 PM
|
|
General
|
|
Join Date: Mar 2007
Location: Japan
Posts: 3,691
Thanks: 269
Thanked 397 Times in 200 Posts
|
|
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?
__________________
Whether he submitted the post, or whether he did not, made no difference. The Thought Police would get him just the same. He had committed— would still have committed, even if he had never set pen to paper— the essential crime that contained all others in itself. Thoughtcrime, they called it. Thoughtcrime was not a thing that could be concealed forever.
http://z7.invisionfree.com/Dom3mods/index.php?
|
August 16th, 2008, 09:02 PM
|
|
Lieutenant Colonel
|
|
Join Date: Jun 2004
Location: Lancaster, OH, USA
Posts: 1,250
Thanks: 28
Thanked 74 Times in 49 Posts
|
|
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.
__________________
"All that is necessary for the triumph of evil is that good men do nothing."
For those looking for with this forum, please see Annette as I am retired.
|
August 16th, 2008, 09:02 PM
|
|
Colonel
|
|
Join Date: May 2005
Location: Kansas, USA
Posts: 1,538
Thanks: 289
Thanked 194 Times in 94 Posts
|
|
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!
|
August 17th, 2008, 05:21 PM
|
|
Brigadier General
|
|
Join Date: Dec 1999
Location: Lancaster, OH 43130
Posts: 1,997
Thanks: 5
Thanked 9 Times in 8 Posts
|
|
Re: Automated redirect for old post/thread links
Quote:
Originally Posted by Ballbarian
|
Okay all of these should work now. Let me know...
__________________
Change is inevitable, how you handle change is controllable - J. Strong
|
The Following User Says Thank You to Richard For This Useful Post:
|
|
August 17th, 2008, 05:34 PM
|
|
Brigadier General
|
|
Join Date: Dec 1999
Location: Lancaster, OH 43130
Posts: 1,997
Thanks: 5
Thanked 9 Times in 8 Posts
|
|
Re: Automated redirect for old post/thread links
Quote:
Originally Posted by Ballbarian
|
Okay all old uploads should redirect now so #1 should work. For #2 what I did is anything with postlist.php goes to a generic page on the new forum. Since we have no way to determine what the old crappy (editorial comment on UBB software ) word based forum names to the new forum numbers we can't do a better automated solution...
__________________
Change is inevitable, how you handle change is controllable - J. Strong
|
The Following User Says Thank You to Richard For This Useful Post:
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
|
|