• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Redirection Scripts for vBulletin 3.x

Status
Not open for further replies.

Marcus

Well-known member
I actually intercept any showthread.php call that has p=xxx in it and redirect it to a proper URL... showthread.php?t=1234&page=3#post343454 for example.[/I]
I have done the same. For xenforo to recognize the anchor, I have to redirect #anchor to &p=
You can do that with redirects to your webserver (apache or nginx).
With my changes to the 301redirect.php script to first lookup the post, the anchor then works perfect.
 

HydraulicJack

Well-known member
Is there yet a way that a mass import of vb 3.8 content wherein the links have all been made SEO friendly by applying vBSEO can be imported en masse such that all links have a proper 301 redirect to the new XF SEO-friendly links?

I'm just needing to get my vB3.8 content completely migrated to XF without losing my precious Page 2 (out of almost 3 million pages indexed by Google) ranking.
If the Google crawler or people using Google to find my site start hitting massive 404's my page rank is gone.

I would REALLY like to liberate my poor new users (and veterans!) from having to hop back and forth between two different forums to get at my complete knowledge base.

Sure hope somebody can offer a solution for this!
Thanks!
HJ
 

Thomas P

Member
Welcome ;)

I have a question regarding this AddOn: I just saw a new feature "Retain imported content IDs".
Using this feature on an import, I possibly only need some rewrite lines without this AddOn, right?

Or am I missing something?

Thanks a bunch,
Tom
 

PVO_Dave

Active member
I've noticed my archive re-directs are not working, I suspect this might be down to me having to add something into the .htaccess file to deal with the normal re-direct looking for a t-.

The archive does seem to have the t-, server error logs show this:

Code:
ErrorException: preg_match() [<a href='function.preg-match'>function.preg-match</a>]: Compilation failed: unrecognized character after (?&lt; at offset 27 - /var/www/vhosts/vauxhallownersnetwork.co.uk/httpdocs/archive/index.php:19
Generated By: Unknown Account, A moment ago
Stack Trace
 
#0 [internal function]: XenForo_Application::handlePhpError('#/archive/index...', '/archive/index....', NULL)
#1 /var/www/vhosts/vauxhallownersnetwork.co.uk/httpdocs/archive/index.php(19): preg_match()
#2 {main}
 
Request State
 
array(3) {
  ["url"] => string(69) "http://www.vauxhallownersnetwork.co.uk/archive/index.php/t-64975.html"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
Is there anything I can do to put this right? If the error logs are anything to go by, we are missing out on a lot of hits from google :)

Ta,
Dave.
 

high1976

Active member
And this is a very quick fix for "page=1234" import. You have to have on both forums the same "posts / page" ratio. In showthread.php change to
this nicely works for paging but it breaks on threads where the 'page' isn't given
Code:
ErrorException: Undefined variable: tmp_addtourl - showthread.php:33
Generated By: Unknown Account, 3 minutes ago
Stack Trace
#0 /var/www/xenforo/htdocs/showthread.php(33): XenForo_Application::handlePhpError(8, 'Undefined varia...', '/var/www/xenfor...', 33, Array)
#1 {main}
Request State
array(3) {
  ["url"] => string(107) "http://domain.com/website-58/possible-problem-bugreport-forum-104214/"
  ["_GET"] => array(1) {
    ["t"] => string(6) "104214"
  }
  ["_POST"] => array(0) {
  }
}
 

high1976

Active member
this seems to work for 'pages=', similar can be used for forumdisplay.php (even if it doesn't make much sense except archives):
PHP:
$input = $inputHandler->filter(array(
't' => XenForo_Input::UINT,
'p' => XenForo_Input::UINT,
'page' => XenForo_Input::UINT
));

$importModel = XenForo_Model::create('XenForo_Model_Import');

$target = false;
if ($input['t'])
{
if ($newId = $importModel->mapThreadId($input['t']))
{
if ($input['page']) 
{ $tmp_addtourl = "page-" . $input['page']; 
$target = XenForo_Link::buildPublicLink('canonical:threads', array('thread_id' => $newId)) . $tmp_addtourl; 
}
else
{
$target = XenForo_Link::buildPublicLink('canonical:threads', array('thread_id' => $newId)); 
}
}
}
 

Mutt

Well-known member
just noticed mine isn't working either

this is an old link to the a post
http://www.sternfannetwork.com/forum/showthread.php?postid=7754742
it's not working & just pushing you to the homepage.

here's the new url. the postid hasn't changed
http://www.sternfannetwork.com/xen/index.php?threads/super-fan-roundtable-upcoming-schedule-ask-to-do-the-show-here.245292/#post-7754742

I was hoping it was just postif links but threadid links aren't working either
http://www.sternfannetwork.com/forum/showthread.php?threadid=245292

looks like I'll have to read thru this whole thread & see if there are any fixes that will work for me.
 

doli

New member
Hope you can help me, just doing test conversion of my forum and found problem with this url redirections:
1. My original vb3.8 forum was: domain*com
2. I installed xenforo on sitename*com/forum and imported it sucesfully
3. I uploaded import-301-vbulletin-v6.zip files to domain*com and changed $fileDir to point to my sitename.com/forum directory.
4. Now all old urls are redirected to forum homepage ... :/ any idea what should I do to make it redirect to correct content ?
 

doli

New member
Hope you can help me, just doing test conversion of my forum and found problem with this url redirections:
1. My original vb3.8 forum was: domain*com
2. I installed xenforo on sitename*com/forum and imported it sucesfully
3. I uploaded import-301-vbulletin-v6.zip files to domain*com and changed $fileDir to point to my sitename.com/forum directory.
4. Now all old urls are redirected to forum homepage ... :/ any idea what should I do to make it redirect to correct content ?
Just checked xf_import_log table ... it's empty :/

update: you can remove both my posts, just made it work, had to put define('IMPORT_LOG_TABLE', 'archived_import_log'); line in 301config.php
 
Status
Not open for further replies.
Top