vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Miscellaneous Hacks - 404 / 301 after import redirect on import ids (https://vborg.vbsupport.ru/showthread.php?t=176964)

Jerry 10-27-2008 08:35 PM

Quote:

Originally Posted by jca2112 (Post 1646606)
Hmm. It looks like vBulletin isn't passing on a 404 error because the old url is pointing to "index.php?showtopic=", and vBulletin will automagically display "index.php" regardless of the "?showtopic=". Is there any way to stop vBulletin from doing this so it will properly call the 404.php file?

Yes, the regexs where the URL is parsed can be changed to take care of that.

raymondblog 11-04-2008 02:04 AM

Jerry, can you make it to support PunBB?

Jerry 11-04-2008 04:12 AM

I'd guess the phpBB2 settings would work.

newsoftw 11-15-2008 10:02 AM

i import my forum from phpbb 3.0.2 to VB 7.3.4 ...

can it work on as a phpmm 3.0.2 importing...

if it working so how to install it..

thanks in ADVNS
new soft world

Divvy 12-18-2008 02:35 AM

Hi everyone,

Can someone help me? I have installed this mod but dont know if is working...
My old forum: http://www.viciadosnosexo.com (ADULT)
My new forum: http://www.viciadosnosexo.com/forum/ (ADULT)

Try to write this in google:
site:viciadosnosexo.com

And click in a link that ends in .html

It is working? Or not?
Also one thing... the 404_actions table is empty for a while. It is normal?

Please help me fixing this...

Thank you!

cooltechie 01-21-2009 04:51 PM

I'm sorry. What exactly do I do? Just edit paths and copy the 404.php to the root and that's it? Please provide more details. Thanks!

brandonroy 02-06-2009 10:43 AM

I need help too. My old forums were powered by smf 1.1.7. I need some help on how to set this up! I'm lost and Google is going to spit on my site!

project-Buckfas 02-16-2009 10:56 AM

I'm hoping to obtain the same thing as you guys.

I don't fancy adding every page on my site to the .htaccess for a 301 redirect.

Mainly because of the time consumption!

Jerry 02-20-2009 04:36 AM

Well there is going to be a major change to this script soon as I'm going to be dealing with ImpEx2 soon that that will be using a separate MEMORY table that stores all the source/target id's (basically foreign keys with source import id).

This will allow for multi import 301 re-directs as there will be now the concept of a phase id, which is a new id for each whole form import. i.e. each merge import you do is a phase and has it's own ID. (p.s. yes this will allow for differential imports ;) ).

There has been enough major boards and requests for this now. i.e. if one board assimilates 4 others with 4 merge imports, they will want 4 unique 301 handlers. And so they will be 4 phase id's to handle that.

Also to address the "Hey you only hard coded a few systems, mine isn't supported" ..... I'm going to try to add a drop in module system, much the same as impex itself that will allow for something along the lines of : "Ah, phase 2 is a phpBB3 -> vB import, I'll set the phase id in the 301 config file and drop in the module for 301 that is set for my urls". So then you can ensure that systems are supported. I'm guessing that the Tier 1 systems will be handled with logging so you'll get viability of the amount of SE redirects.

ForumUser210 02-20-2009 06:09 AM

created my own solution.

Thanks

paintballer.ie 02-22-2009 02:44 PM

Hi,

This is what I am looking for, i am about to convert over to vb from phpbb2.

Are these steps still correct for vb 3.8.1

lazydesis 02-26-2009 06:37 PM

I imported from old vB to new version using Impex, and had the same problem. All threadIDs were different from what they were in my old forum, because I deleted some threads in between.

However instead of using the 404 method, I deleted the "threadid" column in my database and renamed the "importthreadid" column as "threadid"

Now all my threads are having same "threadid" as previous forum

Can anyone tell me if this has any adverse affects or what I did is wrong? Everything seems to working fine and it took me just 5 mins to do this.

What's the advantage of using the 404 method described in this thread?

Thanks.

EDIT: Its actually not working properly. Can someone tell me if its possible to change the new ids with the ones in the importids column and would this work ?

project-Buckfas 02-27-2009 10:04 AM

Any help with the code for smf 1.x.x ?

I'm hoping to go live with my vb soon as I'm pretty much done customising it

paintballer.ie 03-01-2009 08:47 AM

Quote:

Originally Posted by cooltechie (Post 1720287)
I'm sorry. What exactly do I do? Just edit paths and copy the 404.php to the root and that's it? Please provide more details. Thanks!


yes, more info please. I saw raference to a readme.txt what was made, but could not find it.


what does one do with the lines below, as it says to customise?

PHP Code:

$old_id         0;
$action_code    0;
$action         null;
$sql             null;
$page            null;
$postcount        null;

// Get the file names and types 


paintballer.ie 03-02-2009 09:17 PM

I have phpbb2 installed in the root folder and I will be instaling vbulletin in the root folder,

Will this work?

paintballer.ie 03-04-2009 09:28 PM

When I try this is redirects to the normal 404.shtml file I have.

Then in debug mode:

Action ::
SQL ::
REQUEST_URI :: /vbtest/404.php

Any thoughts?

b00k 03-18-2009 11:39 PM

-----------

ranz 04-30-2009 01:28 PM

i like this mod - even if it is "unsupported"

i've been thinking -

perhaps it may also be useful if (in addition to the logging) we could make use of the moderator queue or report post. this way the mods can edit the posts, refer to the notes of the mod queue which shows the link to the new database id - then edit the post and release from the queue.

this could potentially alleviate the extra db load this script is using on the server.

another option is to provide an admincp script that lists the log - which can be used to edit posts.

45wheelgun 06-09-2009 01:26 AM

Has anyone used this in a move from EVE to VB? It seems like it is pretty straight forward, I am just unclear where these variables go:

Forum http://www.oldforum.com/eve/forums/a/frm/f/540103904
Thread http://www.oldforum.com/eve/forums/a...04/m/241103031
User http://www.oldforum.com/eve/personal...e&u=4131095313
Main http://www.oldforum.com/eve/

Can anyone give me a hand or point me in the right direction?

Thanks,
Dave

final kaoss 10-19-2009 12:37 AM

I can use one for MyBB 1.4

Ghostt 10-25-2009 01:40 PM

Does it work with phpbb3?
i had phpbb seo url rewrite mod installed , how to redirect the urls?

Ghostt 10-30-2009 09:14 PM

i really need a phpbb3 redirect 404 script!!! please its important . the most users here coming from phpbb3 share please youre code!!!!

kydyl 12-07-2009 05:35 PM

This might be the best thing ever!!!

The main reason that I have put up the move to vbulletin from my old forum (punbb) has been the URL issue.

When I finally decided to migrate I thought I would need to hack something myself and then I find this :D:D

Extra PC 01-02-2010 07:03 AM

Hello

i don't know how to use it

where i can put it?

do the import from phpbb3 to vb4 and then use it or what?

and can i try it on local server?

xsasox 01-04-2010 09:17 AM

please i want file like (404.php) support old system ( mybb )

the 404.php here supported : 'phpBB2' 'ubb.threads' 'vb3' 'ipb2'

plz help me

i'am waite

xsasox 01-05-2010 08:13 AM

plz help me

xsasox 01-05-2010 08:55 PM

i'am waite

xsasox 01-07-2010 09:30 PM

plz help me

hiker 01-30-2010 05:41 PM

Hi, I haven't tried this yet, I'm importing a phpbb2 to VB 4.0.1

Do I import with Impex first, and then run this script?

And... where does this 404.php file go, which folder?

Thanks.

nestortoledo 03-19-2010 08:23 PM

Any way to use it with Smf 2.0?

I want to redirect my old SMF URLS, to my new vbulletin Urls.

I can help to test it,

The urls of smf are like this

BOARDS: index.php?board=XX
TOPICS: index.php?topic=371036.0
USERS: index.php?action=profile;u=236193

pitrow 03-20-2010 10:36 PM

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.

pitrow 04-13-2010 09:26 PM

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/';
to
Code:

$old_folder        = 'forum/';

change
Code:

$standard_404        = 'http://www.example.com/not_found.html';
to
Code:

$standard_404        = 'http://www.mydomain.com/404.shtml';
this points to my existing 404 file


change
Code:

$new_domain        = 'example';
to
Code:

$new_domain        = 'www.mydomain.com';

change
Code:

$new_folder                = 'vBulletin/';
to
Code:

$new_folder                = '';
notice I completely removed that string since I'm installing in the root.


changed the user, password and database variables to my particular values.


Inside
Code:

switch ($old_system)
{
        case 'phpBB2' :

change
Code:

$old_thread_script        = "viewtopic{$old_ext_type}?t=";
to
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' :

find
Code:

$old_id = intval(substr(substr($_SERVER['REQUEST_URI'], 2), 0,  strpos(substr($_SERVER['REQUEST_URI'], 2), '&')));
now, I wasn't quite sure exactly what Jerry was doing with this code, so I just rewrote it so I'd know it would work. His might work just fine, but I didn't try it.


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
I also deleted everything from the "forum" directory and uploaded an index.php file there that contains this:
Code:

<?PHP
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.mydomain.com/forum.php" );
?>

That way if someone tries to go to the old http://www.mydomain.com/forum, they get redirected to the new forum page, and if someone tries to get a forum or topic, the 404.php gets it and redirects them correctly.

napy8gen 04-14-2010 04:57 PM

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.

adeel80 04-15-2010 08:14 PM

Quote:

Originally Posted by napy8gen (Post 2021267)
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.

I am exactly having the same problem. Can someone please reply.

CRDeveloper 08-24-2010 01:49 AM

Thanks!!

I've upgrade a phpBB 3.0.7 forum to vBulletin 4.0.6 PL1 successfully. Redirects working fine!!!

BrightStar 08-28-2010 11:43 AM

Quote:

Originally Posted by ToxXxicas (Post 2088621)
Thanks!!

I've upgrade a phpBB 3.0.7 forum to vBulletin 4.0.6 PL1 successfully. Redirects working fine!!!

Could you please help me doing that as well?

I've upgraded from phpBB but it was with SEO Mod to vBulletin. Now struggling to understand what I am supposed to do.

traen 02-05-2011 03:15 PM

Does this work with several types of old forums at once, or are you limited to using one at a time?

futurist 02-09-2011 05:38 PM

No updates for SMF ?
I appreciate the work.
But including only a few boards is not good enough.

Regards

MarpeX 06-13-2011 07:25 AM

Quote:

Originally Posted by lazydesis (Post 1755441)
I imported from old vB to new version using Impex, and had the same problem. All threadIDs were different from what they were in my old forum, because I deleted some threads in between.

However instead of using the 404 method, I deleted the "threadid" column in my database and renamed the "importthreadid" column as "threadid"

Now all my threads are having same "threadid" as previous forum

Can anyone tell me if this has any adverse affects or what I did is wrong? Everything seems to working fine and it took me just 5 mins to do this.

What's the advantage of using the 404 method described in this thread?

Thanks.


EDIT: Its actually not working properly. Can someone tell me if its possible to change the new ids with the ones in the importids column and would this work ?

I have exactly the same question. My former board was a vB 4 from which I imported all the threads, posts and users to a news vB 3.8.6. Now the IDs in the URLs like http://www.domain.de/forum/category/1234-thread-title.html are not the same like in the old vB 4 board. What can I do?

licensinglinks 10-25-2011 06:41 PM

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:

http://www.mechanicaldesignforum.com/forum/viewtopic.php?f=39&t=117 

However, since switching to vBulletin the new link has changed to:

PHP Code:

http://www.mechanicaldesignforum.com/forum/showthread.php?69-female-mechanical-designers 

Someone pointed me to this thread, but setting this solution up seems WAY beyond my abilities. I feel totally stuck.

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.


All times are GMT. The time now is 06:45 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01280 seconds
  • Memory Usage 1,841KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (16)bbcode_code_printable
  • (3)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete