Resource icon

Redirection Scripts for vBulletin 3.x 8.0

No permission to download
It is working indeed. Got confused between your instructions, and the ones that said to have a few files in the old forum folder. Now everything is working, thanks Jake, you are a star!
 
It appears that invalid thread ids are accepted and redirected to the homepage instead of giving a 404. This is very problematic because websites link to content which have been deleted. Google webmaster tools is giving me warnings about these redirects.
 
FYI this is what worked for me:

Code:
location /forum/ {
    rewrite ^/forum/[^/]+/([0-9]+)-([^.]+)\.html$ /threads/$1/ permanent;
}
 
Today we upgraded MySQL and PHP to the latest versions. Since then we're getting these errors in xf CP (every few minutes), so I assume is has something to do with the (old) re-directions:

Error Info
Zend_Controller_Response_Exception: Cannot send headers; headers already sent in /home/skodaforum/domains/skodaforum.nl/public_html/board/vbseo/includes/functions_vbseo_pre.php, line 279 -library/Zend/Controller/Response/Abstract.php:321
Generated By: Unknown Account, 45 minutes ago
Stack Trace
#0 /home/skodaforum/domains/skodaforum.nl/public_html/forum/library/Zend/Controller/Response/Abstract.php(148): Zend_Controller_Response_Abstract->canSendHeaders(true)
#1 /home/skodaforum/domains/skodaforum.nl/public_html/board/showthread.php(49): Zend_Controller_Response_Abstract->setRedirect('http://www.skod...', 301)
#2 /home/skodaforum/domains/skodaforum.nl/public_html/board/vbseo.php(1397): require('/home/skodaforu...')
#3 {main}
For example here:
http://www.skodaforum.nl/board/f12/aanpassing-geplaatste-postings-de-forum-bazaar-17658.html


The old vb forum is located in /board, the new one in /forum

We moved to Xenforo about two years ago, so we could do without the redirections now.

So my question is: is the above error caused by the redirection? If yes, how do we get rid of it?

Thanks! :)

EDIT: On second thought it would be better if we could keep the redirections working, because of all old links within the forum.
 
Last edited:
Got it! It was VBSEO causing trouble. This did the trick:

Code:
To fix the error with VBSEO you need to:

1) edit /vbseo/includes/functions_vbseo-pre.php
2) on line 181 find: function path($type = '')
3) replace with: public static function path($type = '')
4) save file.

Done
 
OK, I've uploaded all the files to the forum root, i've edited the 301config.php file to have the import log table, archived_import_log, and also the path, /home/xxxx/public_html/forumxf

But when I try a VB style url, /showthread.php?t=57171 for example, I just get sent to the forum index. That threadid definitely exists in the import archive, I found it manually. (It's also the same ID on XF as I kept IDs.)

I read through several pages (admittedly not all) but everyone who seemed to have the problem had it because they forgot to put the import table into the config file.

Anything else to check?

Do the forums need to be "on" for these to work? I've tested both ways but would feel more comfortable testing in the future if it isn't an issue.

Edit- I do see since I'm using the same ids this can probably be done via just urlrewrites- but still curious what is wrong.
 
Last edited:
If the redirects return you to the index, that is almost certainly down to the incorrect import log table being used. I would double check that and perhaps check in the DB that the table seems to contain the correct data. Also, don't keep trying the same URL as your browser is likely caching the results.
 
Thanks Mike... It was the browser cache... the first time I tried it I hadn't made any changes to the config file- once I tried a different ID, it worked.
 
I edited all the files to work for both vb3 & vb2 links.if anyone needs htem I'd be happy to provide the edits.
What are the edits? I have about 1800 incoming links that use threadid and right now they all go to the homepage
 
I think I'm missing something. I have installed the scripts into the directory /mb on my host. That's where I used to keep my vbulletin message board. I've redirected it to the correct directory on my host, but it just takes me to the index rather than a specific thread or forum. And when you go to the directory itself, you get a list of the files within instead of being redirected to the new forum:

http://improvresourcecenter.com/mb/

What might I be missing?

Nevermind! I figured it out.
 
Last edited:
I think I'm missing something. I have installed the scripts into the directory /mb on my host. That's where I used to keep my vbulletin message board. I've redirected it to the correct directory on my host, but it just takes me to the index rather than a specific thread or forum. And when you go to the directory itself, you get a list of the files within instead of being redirected to the new forum:

http://improvresourcecenter.com/mb/

What might I be missing?
Did you edit the config file?
 
The redirect URL is based on your "Board URL" setting. If the redirects aren't going where you expect, you need to check that setting. (Once you change it, be aware that browsers will cache redirects; try with an empty cache.)
 
Top Bottom