vBulletin 4.x URL Redirection

vBulletin 4.x URL Redirection 1.0.0

No permission to download

Add this to the top of the .htaccess file in your web root (which should be XF's .htaccess file):

Code:
RewriteEngine On

RewriteCond %{QUERY_STRING} (^|\?)([0-9]+)-[^&]+&p=([0-9]+)$
RewriteRule ^showthread\.php$ /posts/%3/? [R=301,L]

That should do it.
 
Hi guys,

I'm needing some help with this:
This is the old url format:
http://www.domain.com/chainsaw/185736.htm
New url format:
http://www.domain.com/community/threads/thread-title.189566/

What .htaccess rules do you suggest me Jake?

That is the same thread, right? So the ids are different?

Put this at the top of the .htaccess file in the web root:

Code:
RewriteEngine On

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

Then you need to upload these redirect scripts to the /community directory:

http://xenforo.com/community/resources/redirection-scripts-for-vbulletin-3-x.264/
 
That is the same thread, right? So the ids are different?

Put this at the top of the .htaccess file in the web root:

Code:
RewriteEngine On

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

Then you need to upload these redirect scripts to the /community directory:

http://xenforo.com/community/resources/redirection-scripts-for-vbulletin-3-x.264/
I've checked the option to preserve IDs but it seems they weren't preserved. Both URLs are of the same thread..
 
If I want to redirect vb4 which was installed in root, but have the xenforo installed in a directory, e.g. domain.com/forum, then after uploading the (standard-basic-advanced) files to the root, is the only thing I need do set the path in 301configold.php

e.g. $fileDir = '/data01/user/public_html/domainrootfolder/forum';

I'm a bit confused because I had this working fine, but after a server change with the same host (which only required a change from /data04/ to /data01/) the redirects are no longer working.

Thanks for any help.
 
If I want to redirect vb4 which was installed in root, but have the xenforo installed in a directory, e.g. domain.com/forum, then after uploading the (standard-basic-advanced) files to the root, is the only thing I need do set the path in 301configold.php

e.g. $fileDir = '/data01/user/public_html/domainrootfolder/forum';

I'm a bit confused because I had this working fine, but after a server change with the same host (which only required a change from /data04/ to /data01/) the redirects are no longer working.

Thanks for any help.

Were there rewrite rules being used in conjunction with the PHP redirect scripts? If so then make sure the .htaccess file containing those rules was copied to the new server.

If the problem persists then I need more information. Please provide an example old and new thread URL so I can know exactly what is needed for your redirects.
 
I am now in my 14th hour trying to migrate to Xen from vBulletin. Got everything done but I am failing miserably on the redirect process. I've followed the instructions provided (Installed the redirect scripts, modified 301config.php to the correct folder and the archived import) and I still cannot get anything to redirect.

I'm so utterly confused as to how all this fits together, let alone what to put into the .htaccess file.

I'm moving from vb Advanced URLS
http://www.mywebsite.com/showthread.php/48576-thread-title

to

Xenforo Friendly Urls
http://www.mywebsite.com/community/threads/thread-title.48576/

I transferred all thread ids. My old forum is located in the root. My new forum is located in /community/

I've tried a couple ReWrite rules in the HTACCESS file but none of them seem to be working. For example:
RewriteRule ^/showthread.php /community/showthread.php
RewriteRule ^/forumdisplay.php /community/forumdisplay.php

It's nearly 2am here and I started this at noon so my problem-solving aptitude ran out about 4 hours ago.

Can anyone help? At the moment my forum is OFF and in hiatus until I can figure this out.

EDIT: Now, every thread just redirects to the new forum home page.
 
Last edited:
OK, so I got it working. Just some points of clarification for anyone who might struggle on this like I did. Here is everything that I did wrong:

1) I uploaded the redirect scripts (301config , showthread.php, etc.) in the wrong directory. The instructions on this says to "upload the scripts to your forum root". Well, which forum root? THE OLD? Or the NEW? In my case, I uploaded them to the NEW. They should have been put to the OLD. To the author of this thread ... it probably would be a good idea to make this clarification in the instructions. When someone is doing this, there are two forum roots, and old, and a new. Please specify that it is the OLD forum root in which the files go. Thx.

2) In the 301config file, I edited the import log correctly, but FORGOT to delete the slash. (Uncomment the line). Duh.
 
Were there rewrite rules being used in conjunction with the PHP redirect scripts? If so then make sure the .htaccess file containing those rules was copied to the new server.

If the problem persists then I need more information. Please provide an example old and new thread URL so I can know exactly what is needed for your redirects.
Thanks, but I have got it working now, more by trial and error than anything
 
bit of trial and error, but got this working for a client just now moving from /vb4 to root. Thanks @Luke Foreman for this release and all the pointers from @Jake Bunce that helped get it working after some .htaccess trial and errors!
 
Hmm,

No help as yet. I was hoping XF would be more helpful than vB.

My traffic is down 60% since "upgrading" to XF.

Maybe I made a mistake:(
@jakebunce
 
Last edited:
Hi folks,

I've just moved from vB4.2 with vBSEO & I'm struggling with the redirects.

I'm pretty sure I've done all I should but the redirects are not working.

The forum is in the same directory as the vB

Here are the URLs:

Old: http://www.type-ra.com/subaru-forum...6492-impreza-sports-wagon-gravel-express.html

New: http://www.type-ra.com/subaru-forum/threads/impreza-sports-wagon-gravel-express.16492/

Any ideas?

Thanks :)

Put at the top of the .htaccess file inside of /subaru-forum

Code:
RewriteEngine On

RewriteRule ^[^/]+/([0-9]+)-[^\.]+\.html$ /subaru-forum/threads/$1/ [R=301,L]
 
Put at the top of the .htaccess file inside of /subaru-forum

Code:
RewriteEngine On

RewriteRule ^[^/]+/([0-9]+)-[^\.]+\.html$ /subaru-forum/threads/$1/ [R=301,L]
Thanks Jake,

I tried that but no joy sadly. Any other ideas?

Thanks

Dean

With a bit of faffing this has sorted it.

Thanks Jake:D
 
Last edited:
My problem was due to using the default example in 301config.php:

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

    define('IMPORT_LOG_TABLE', 'import_log_my_forums');

Once I changed it to

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

Everything suddenly worked like a dream.
 
Would be nice if this could be adapted to support different pages for showthread and forumdisplay, like the vB 3 redirect script does.
 
Top Bottom