Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
404 / 301 after import redirect on import ids Details »»
404 / 301 after import redirect on import ids
Mod Version: 1.00, by Jerry (Contributor) Jerry is offline
Developer Last Online: Oct 2010 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.6.9 Rating: (10 votes - 4.80 average) Installs: 50
Released: 23 Apr 2008 Last Update: Never Downloads: 707
Not Supported Re-usable Code  

After importing from a source board there will be internal and external links that point to the old URLS.

During the import the origional import id's are kept (for one import) so a redirect can be calculated to find the new user/forum/thread/post, by looking up the old import{$type}id.

ImpEx currently alters the table to add the import id, though a planned future version will have this separated so multi-import sites can be managed,

The original discussion thread on vBulletin.com :

http://www.vbulletin.com/forum/showthread.php?t=178161

It is advised that $do_404 = false; is set so the 301 is sent with the new URL to update search engines.

The script needs setting up and customising to each site as the domains and URLs can be different.

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Comments
  #2  
Old 23 Apr 2008, 20:20
paramegsoft paramegsoft is offline
 
Join Date: Apr 2008
welcome Jerry

does this script work ok to phpbb3

Last edited by paramegsoft; 21 May 2008 at 01:11.
Reply With Quote
  #3  
Old 23 Apr 2008, 20:38
Jerry's Avatar
Jerry Jerry is offline
 
Join Date: Jun 2003
This will work with forums where you can parse the URL to get the old id and the script will look up the new one.

As with any install of it, you have to customise it for your site.
__________________
All the ImpEx are belong to us.
Reply With Quote
  #4  
Old 24 Apr 2008, 01:03
jca2112's Avatar
jca2112 jca2112 is offline
 
Join Date: Sep 2007
Question Ipd

I assume the "ipd2" setting (for Invision 2.0) would also work for Invision 1.3 imports? (I believe the IPB url structure is the same for 1.3 and 2.0+ versions, no?)
Reply With Quote
  #5  
Old 24 Apr 2008, 01:13
Jerry's Avatar
Jerry Jerry is offline
 
Join Date: Jun 2003
If the URLs, GET vars and file names are the same, I would of thought so yes.
__________________
All the ImpEx are belong to us.
Reply With Quote
  #6  
Old 01 May 2008, 16:09
Lateuk Lateuk is offline
 
Join Date: Dec 2006
Just tried it on a test install (in the process of going from PHPBB2 to vBulletin) and it works a treat.

Thanks
Reply With Quote
  #7  
Old 01 May 2008, 18:54
Jerry's Avatar
Jerry Jerry is offline
 
Join Date: Jun 2003
Good to know
__________________
All the ImpEx are belong to us.
Reply With Quote
  #8  
Old 15 Jul 2008, 13:31
jbeam jbeam is offline
 
Join Date: Mar 2008
I have an odd problem. It works for everything but User Profiles. When someone clicks on an old user profile link from PHPBB2 it takes the user to Profile 0 in vBulletin. If you set it to debug mode, sure enough, no matter what old user profile link you click on it comes back as 0.

Now, I am not totally code illiterate, but I come from the C++ / VB world and know very little about PHP. I have tried to follow the code, but I just can not grasp what some of the functions are doing.

If anyone has had this problem and found a solution, please let me know.
Reply With Quote
  #9  
Old 15 Jul 2008, 16:10
Jerry's Avatar
Jerry Jerry is offline
 
Join Date: Jun 2003
Sounds like you have a different user URL to the one that is being expected.

Can you give an example of the old phpBB profile URL that is being requested ?
__________________
All the ImpEx are belong to us.
Reply With Quote
  #10  
Old 21 Jul 2008, 15:54
jbeam jbeam is offline
 
Join Date: Mar 2008

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

This is an example of one of the old URL's. From what I can tell it looks right.

Last edited by jbeam; 21 Jul 2008 at 19:39.
Reply With Quote
  #11  
Old 28 Jul 2008, 14:18
jbeam jbeam is offline
 
Join Date: Mar 2008
Anyone have any ideas?
Reply With Quote
  #12  
Old 29 Jul 2008, 15:07
tommythejoat's Avatar
tommythejoat tommythejoat is offline
 
Join Date: Apr 2008
Real name: Tom McIntyre
Jerry,

I am planning to install this for my bbV2 migration. I presume there is no reason to keep all the code for the other message board combinations with the conditionals, switches and so forth. I can just hard code it for the bbV2 url forms.

bbV2 does not support displaying posts independently of threads, and does not support displaying user profiles externally. I was planning to just provide the translation of thread and forum references.

Since bbV2 is a Perl script, the form of the urls are /bbBoard.cgi?a=viewthread;fid=3;gtid=305734 for a thread and bbBoard.cgi?a=viewforum;fid=3 for a forum. I could use your logic for the forum, but I will need to use a regular expression to skip the fid piece for threads.

When Jelsoft installed of vBulletin, they installed it in the root of the web (/var/www/html/) so there is no folder for the message board. I will need to modify the code to recognize this also.

When I have it working, I will post it here.

If you have any advice to offer, it would be appreciated.
Reply With Quote
  #13  
Old 29 Jul 2008, 19:11
Deepdog009's Avatar
Deepdog009 Deepdog009 is offline
 
Join Date: Dec 2004
Good Job

Nice!!!
__________________
Long vacation folks, back 2 dabble and doodle... *** Enjoy the Forums
Reply With Quote
  #14  
Old 30 Jul 2008, 14:02
tommythejoat's Avatar
tommythejoat tommythejoat is offline
 
Join Date: Apr 2008
Real name: Tom McIntyre
As mentioned in my previous response, I was modifying this tool to work with a bbBoardV2 migration.

A question comes up with respect to migrating between two different servers. The old server is still alive and clearly this script needs to run on the new server where vBulletin is located. If I put a redirect on the old board in place of the bbBoard.cgi script, I think that will handle it, but I am not sure.

Can anyone who has done this answer the question? My old board is currently live and I don't want to disrupt it just for an experiment.

I am attaching my modified version of 404.php (404t.php).

The contents of my .htaccess file are

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

I have not yet run this and would appreciate a quick review. I found it was easier to extract values from the cgi style uri than I thought. The php intval function gets a number and ignores any following text. Therefore, you just need to start the evaluation following the "=" in the parameter string for the particular parameter. i.e. ;fid=, ;gtid=, ;pagenumber=.
Attached Files
File Type: php 404t.php (7.0 KB, 17 views)
Reply With Quote
  #15  
Old 30 Jul 2008, 23:14
Jerry's Avatar
Jerry Jerry is offline
 
Join Date: Jun 2003
Originally Posted by jbeam View Post
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

This is an example of one of the old URL's. From what I can tell it looks right.
That is a default link for the profile and what the script is expecting, the default in the script should be fine, just set the domain :


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Originally Posted by tommythejoat View Post
Jerry,

I am planning to install this for my bbV2 migration. I presume there is no reason to keep all the code for the other message board combinations with the conditionals, switches and so forth. I can just hard code it for the bbV2 url forms.
Yes, you don't need any of it, it's the import id's in the vBulletin tables and this script that take care of the look ups and refrences to old data.

Originally Posted by tommythejoat View Post
bbV2 does not support displaying posts independently of threads, and does not support displaying user profiles externally. I was planning to just provide the translation of thread and forum references.
Half the work then

Originally Posted by tommythejoat View Post
Since bbV2 is a Perl script, the form of the urls are /bbBoard.cgi?a=viewthread;fid=3;gtid=305734 for a thread and bbBoard.cgi?a=viewforum;fid=3 for a forum. I could use your logic for the forum, but I will need to use a regular expression to skip the fid piece for threads.
True, for the forum it looks like a fixed length string with the forumid on the end so crop the string and what ever is left is the forum id, as for the thread id, i'd use this :


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Where :


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

For :


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Originally Posted by tommythejoat View Post
As mentioned in my previous response, I was modifying this tool to work with a bbBoardV2 migration.

A question comes up with respect to migrating between two different servers. The old server is still alive and clearly this script needs to run on the new server where vBulletin is located. If I put a redirect on the old board in place of the bbBoard.cgi script, I think that will handle it, but I am not sure.
You could update the DNS to send the old requests to the new server and have the web server handle it.
__________________
All the ImpEx are belong to us.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 21:59.

Layout Options | Width: Wide Color: