The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
404 / 301 after import redirect on import ids Details »» | |||||||||||||||||||||||||||
404 / 301 after import redirect on import ids
Developer Last Online: Oct 2010
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. Show Your Support
|
Comments |
#72
|
|||
|
|||
for those asking for phpbb3, this script will work for that with a few mods.
I successfully used it this weekend for a phpbb3 -> vb4 CMS swap. Works just fine. |
#73
|
|||
|
|||
OK, here's what I did. Keep in mind it may not work for you, depending on your setup.
I was upgrading from phpbb 3.0.3 to vB CMS 4.0. the old forum was on www.mydomain.com/forum. The new CMS was installed in the root. Most of the code works just fine, but here's exactly what I changed from the default 404.php you can download off of this page (as of today anyway). change Code:
$old_folder = 'phpBB/'; Code:
$old_folder = 'forum/'; change Code:
$standard_404 = 'http://www.example.com/not_found.html'; Code:
$standard_404 = 'http://www.mydomain.com/404.shtml'; change Code:
$new_domain = 'example'; Code:
$new_domain = 'www.mydomain.com'; change Code:
$new_folder = 'vBulletin/'; Code:
$new_folder = ''; changed the user, password and database variables to my particular values. Inside Code:
switch ($old_system) { case 'phpBB2' : Code:
$old_thread_script = "viewtopic{$old_ext_type}?t="; Code:
$old_thread_script = "viewtopic{$old_ext_type}?f="; inside Code:
// It's for the old forum if (strpos($_SERVER['REQUEST_URI'], "/{$old_folder}") === 0) { switch ($old_system) { case 'phpBB2' : Code:
$old_id = intval(substr(substr($_SERVER['REQUEST_URI'], 2), 0, strpos(substr($_SERVER['REQUEST_URI'], 2), '&'))); replace that line with: Code:
$topic_loc = strpos($_SERVER['REQUEST_URI'],"&t="); $end_loc = strpos($_SERVER['REQUEST_URI'],"&",$topic_loc+1); if ($end_loc === FALSE) { $old_id = substr($_SERVER['REQUEST_URI'],$topic_loc+3); } else { $old_id = substr($_SERVER['REQUEST_URI'],$topic_loc+3, ($end_loc-($topic_loc+3))); } That's it. I uploaded that to the root of my account, and made a .htaccess file with this line in it: Code:
ErrorDocument 404 /404.php Code:
<?PHP Header( "HTTP/1.1 301 Moved Permanently" ); Header( "Location: http://www.mydomain.com/forum.php" ); ?> |
#74
|
|||
|
|||
I couldnt get the topic redirection right, only for members.
the example old link in google always in this format: www.siasat.pk/forum/viewtopic.php?f=34&t=12541 I am using basic friendly urls, this is new vb4 features. the url generated by it something like this. notice there is only topic number. http://www.siasat.pk/forum/showthrea...ing-Blackwater. any help Pitro would be great. |
#75
|
|||
|
|||
Quote:
|
#76
|
||||
|
||||
Thanks!!
I've upgrade a phpBB 3.0.7 forum to vBulletin 4.0.6 PL1 successfully. Redirects working fine!!! |
#77
|
||||
|
||||
Quote:
I've upgraded from phpBB but it was with SEO Mod to vBulletin. Now struggling to understand what I am supposed to do. |
#78
|
|||
|
|||
Does this work with several types of old forums at once, or are you limited to using one at a time?
|
#79
|
|||
|
|||
No updates for SMF ?
I appreciate the work. But including only a few boards is not good enough. Regards |
#80
|
|||
|
|||
Quote:
|
#81
|
|||
|
|||
OK I'm in a bit of a panic. I just switched from phpBB3 to vBulletin and all my Google links have totally screwed up. This have resulted in traffic I've carefully built up for 2 years going off the edge of a cliff. I had no idea that this would happen!!!
Here's an example of a link that comes up in google to my old phpBB board. PHP Code:
PHP Code:
Can anyone explain to me a step-by-step guide how to solve my problem. And please explain it to me like I'm 2 years old because I'm not joking - I really don't have a clue what to do and where to start. I would really appreciate some help. I really need to get this fixed fast so my Google ranking doesn't get destroyed. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|