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 - phpBB2 Thread URL Redirection Script (https://vborg.vbsupport.ru/showthread.php?t=138128)

bbcentral 03-10-2007 11:14 PM

Quote:

Originally Posted by Soliloquy (Post 1178881)
This looks like exactly what I need! Except my old phpBB forum was in the /forum directory and the new vBulletin forum is in the root directory. Is there any way to change it?

Try this one:
Attachment 61703

Upload it into your /forum/ folder, it will include the vB files from the root directory and redirect there, it's customised just for your situation.

nixcraft 04-26-2007 09:35 AM

Hey, this is an excellent script, i had something like this for my old blog :) you saved my time :D

aam 05-07-2007 11:00 AM

Does exactly as what it says on the packet. Nice.

Luky 05-07-2007 12:01 PM

good if you just SEO'ed

Mrdby 05-08-2007 11:35 AM

i need to see a demo

propeller 05-22-2007 06:09 AM

This would set 301 redirects for the search engines.

header( "HTTP/1.1 301 Moved Permanently" );
header("Location: ".$redir);
exit();

patch developer 05-23-2007 04:24 AM

There is something not clear for me , i had a phpBB2 forum which is reside in folder1 and i moved to VBulletin in another folder let us say folder2 , i imported all the data using Impex tool , so i want to confirm this viewtopic.php it should be copied in the old forum folder (folder1) ?

maxicep 05-25-2007 01:14 PM

do not working on my 3.66.
redirecting to forumhome page

Riccardo83 05-27-2007 12:54 AM

this is great, what about those who used mod_rewrite on phpBB2 ? SEO Mod

Meaning how do i get this url http://www.alizee-forum.com/topic,14063,.html redirected properly?

Meaning to get it to redirect to http://www.alizee-forum.com/viewtopic.php?t=14063 and ur script will then do redirect to http://www.alizee-forum.com/showthread.php?t=16946

bbcentral 06-20-2007 08:04 AM

Quote:

Originally Posted by Mrdby (Post 1243590)
i need to see a demo

There's a working demo in the main post, but I'll repost it here:
Working demo
Thread name "The Apogee Interview series and the weekly Prey update"
Old phpBB2 URL: http://www.bluesbrotherscentral.com/...pic.php?t=2374
New vB URL: http://www.bluesbrotherscentral.com/...ead.php?t=2190

Quote:

Originally Posted by propeller (Post 1252538)
This would set 301 redirects for the search engines.

Thanks for that, I can't believe I didn't think of including that when I've used it everywhere else on my site! Added it into the code, released v1.01, and put your name in the credits :)

Quote:

Originally Posted by patch developer (Post 1253097)
There is something not clear for me , i had a phpBB2 forum which is reside in folder1 and i moved to VBulletin in another folder let us say folder2 , i imported all the data using Impex tool , so i want to confirm this viewtopic.php it should be copied in the old forum folder (folder1) ?

Your old forum used to be in /folder1/viewtopic.php?t=1234
Your new forum is in /folder2/showthread.php?t=5678
What you're doing is replacing the original viewtopic.php page with my file. Now, you're going to need to modify the viewtopic.php code slightly so it includes the config.php file in folder2.
Line 16 should become:
Code:

include_once "../folder2/includes/config.php";
Line 60 should become:
Code:

header("Location: /folder2/".$redir);
I think that's all you need to do, but I haven't tested it.

Quote:

Originally Posted by maxicep (Post 1254457)
do not working on my 3.66.
redirecting to forumhome page

If it can't get the topic ID or the post ID, then it redirects back to the homepage.
You need to make sure that when you ran Impex it kept all the importpostid and importthreadid values in the vb_thread and vb_post tables. Redirecting to the homepage is the failsafe for threads which have been deleted or invalid links.

Quote:

Originally Posted by Riccardo83 (Post 1255269)
this is great, what about those who used mod_rewrite on phpBB2 ? SEO Mod

Meaning how do i get this url http://www.alizee-forum.com/topic,14063,.html redirected properly?

Meaning to get it to redirect to http://www.alizee-forum.com/viewtopic.php?t=14063 and ur script will then do redirect to http://www.alizee-forum.com/showthread.php?t=16946

You're going to have to find a way to do that yourself, I would think you could just copy whatever you were doing for phpBB2. If you used .htaccess, add the same thing to your current .htaccess file.
Just as a guess, maybe:
Code:

RewriteRule ^topic,([0-9]*),.html* /viewtopic.php?t=$1
(I genuinely have no idea if that will work, found the snippet on another site)
This should redirect back to /viewtopic.php, which will then check your vBulletin tables for the new Thread or Post ID, and do the redirect as normal.
It's 3 steps instead of 2, but not a huge problem :)


All times are GMT. The time now is 02:10 PM.

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.01118 seconds
  • Memory Usage 1,744KB
  • 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
  • (3)bbcode_code_printable
  • (6)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
  • (10)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