vBulletin 4.x URL Redirection

vBulletin 4.x URL Redirection 1.0.0

No permission to download
So I was using basic URLs on my vB forum. I've uploaded the needed files into my xen root, but it doesn't redirect me to the proper threads. I've checked my archive_log table and it seems full of data. What am I missing?

edit: I thought it was that I missed editing the 301.php script to include the table name. But I just did that and it didn't help.

If your import log table is named "archived_import_log" then you must specify that in the 301config.php file. It's the last line in that file, and you must remove the "//" in front of it to activate that line:

Code:
	define('IMPORT_LOG_TABLE', 'archived_import_log');
 

Upload these scripts to your web root:

http://xenforo.com/community/resources/redirection-scripts-for-vbulletin-3-x.264/

Then add these rules to the top of the .htaccess file in your web root (which is XF's .htaccess file):

Code:
RewriteEngine On

RewriteRule ^[^/]+/([0-9]+)-[^\.]+\.html$ /showthread.php?t=$1 [R=301,L]

That should do it.
 
If your import log table is named "archived_import_log" then you must specify that in the 301config.php file. It's the last line in that file, and you must remove the "//" in front of it to activate that line:

Code:
    define('IMPORT_LOG_TABLE', 'archived_import_log');
Yeah, I did that, but links still just redirect to the home page.
 
Yeah, I did that, but links still just redirect to the home page.

That usually indicates an incorrect table name in that setting. Examine your database and make sure there isn't another import log table that might be the correct one.
 
That usually indicates an incorrect table name in that setting. Examine your database and make sure there isn't another import log table that might be the correct one.
There doesn't seem to be. I just used the default name of 'archived_import_log'. And that table is FULL of data.
 
There doesn't seem to be. I just used the default name of 'archived_import_log'. And that table is FULL of data.
So I should report back that I fixed this issue. I assumed from reading 301config.php, that I only needed to set the file directory if Xen was in a different directory. Mine isn't. But once I set the $fileDir variable, everything worked.
 
Seeing this on a fresh XF install with vBulletin data imported. Trying to load any page results in a white screen

Code:
ErrorException: Fatal Error: Class 'Dark_vB4Redir_Route_Prefix_Forums' not found -library/XenForo/Route/Prefix.php:85
Generated By: xxx, A moment ago
 
Seeing this on a fresh XF install with vBulletin data imported. Trying to load any page results in a white screen

Code:
ErrorException: Fatal Error: Class 'Dark_vB4Redir_Route_Prefix_Forums' not found -library/XenForo/Route/Prefix.php:85
Generated By: xxx, A moment ago

That indicates that you are using the mod_rewrite redirects of this addon, and that you didn't correctly upload the files for this addon. Your /library directory should have a /Dark directory inside of it.
 
That indicates that you are using the mod_rewrite redirects of this addon, and that you didn't correctly upload the files for this addon. Your /library directory should have a /Dark directory inside of it.
Thanks Jake it's there. I'll try a fresh upload though.
 
Ok, before I uploaded the redirect scripts the URL would stay intact, but it wouldn't load anything.

Then I downloaded and uploaded these files and edited the 301config.php file with my archive log and once that's done I get a 404 error.
 
Hi- I am having trouble with my vB 4.2 redirects

I have imported from vB4.2.2 with vBSEO
I retained IDs during the import.

vb was in /forums
XenForo is in /XFforums
I have edited 301config.php for that change.

The vB forums were at http://forums.mydomain.com which pointed to the directory /forums.
Now http://forums.mydomain.com points to /XFforums

I have put the 4.x redirect scripts in /forums where vB was before.

My vBSEO URLs looked like this

http://forums.mydomain.com/
http://forums.mydomain.com/general-discussion-forum/
http://forums.mydomain.com/general-discussion-forum/81645-this-thread.html
http://forums.mydomain.com/general-discussion-forum/81645-this-thread.html#post559658

What should I put in the .htaccess?
Should I move the redirect scripts and .htaccess to /XFforums since the subdomain now points there?

Thanks
 
I've moved the scripts to the same folder as XF. Still can't get the redirects right.
Here is my htaccess
Code:
#    Mod_security can interfere with uploading of content such as attachments. If you
#    cannot attach files, remove the "#" from the lines below.
#<IfModule mod_security.c>
#    SecFilterEngine Off
#    SecFilterScanPOST Off
#</IfModule>

ErrorDocument 401 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 500 default

<IfModule mod_rewrite.c>
    RewriteEngine On
 
    #Next two lines for redirect vBSEO to XF
    RewriteRule [^/]+/([\d]+)-.+-([\d]+).html showthread.php?t=$1&page=$2 [NC,L]
    RewriteRule [^/]+/([\d]+)-.+.html showthread.php?t=$1 [NC,L]

    #    If you are having problems with the rewrite rules, remove the "#" from the
    #    line that begins "RewriteBase" below. You will also have to change the path
    #    of the rewrite to reflect the path to your XenForo installation.
    #RewriteBase /xenforo

    #    This line may be needed to enable WebDAV editing with PHP as a CGI.
    #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]
</IfModule>
 
Top Bottom