The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
phpBB2 Thread URL Redirection Script Details »» | |||||||||||||||||||||||||
This is a very simple script I wrote after I converted two forums from phpBB2 to vBulletin.
The problem was that there were dozens of pages across the web linking to particular phpBB2 threads, ie: http://www.website.com/forum/viewtopic.php?t=1234 Of course now those links are dead, as the correct URL would be: http://www.website.com/forum/showthread.php?t=2345 My simple script is just one single file that you upload to your forum root folder. It doesn't modify any code, doesn't require any installation, and zero configuration is required (it uses the includes/config.php to get the database settings. If someone clicks on a link to viewtopic.php (either pointing to a thread or a post), then it will link to that same thread at showthread.php. Installation Instructions Upload viewtopic.php to your vBulletin root folder, eg /forum/ 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 Notes
Update June 20, 2007 - Added changes suggested by 'propeller', now uses 301 redirect for search engines. Show Your Support
|
Comments |
#12
|
||||
|
||||
Quote:
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. |
#13
|
|||
|
|||
Hey, this is an excellent script, i had something like this for my old blog you saved my time
|
#14
|
|||
|
|||
Does exactly as what it says on the packet. Nice.
|
#15
|
|||
|
|||
good if you just SEO'ed
|
#16
|
|||
|
|||
i need to see a demo
|
#17
|
|||
|
|||
This would set 301 redirects for the search engines.
header( "HTTP/1.1 301 Moved Permanently" ); header("Location: ".$redir); exit(); |
#18
|
|||
|
|||
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) ?
|
#19
|
|||
|
|||
do not working on my 3.66.
redirecting to forumhome page |
#20
|
||||
|
||||
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 |
#21
|
||||
|
||||
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 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:
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"; Code:
header("Location: /folder2/".$redir); 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:
Just as a guess, maybe: Code:
RewriteRule ^topic,([0-9]*),.html* /viewtopic.php?t=$1 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 |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|