XF 2.3 vBulletin redirect - old forum was in "forums"

readconsults

New member
Hello,

I've just converted a vBulletin 4 forum to vBulletin - it went great! Nice tools.

I'm at the stage where I need to setup the redirects. I have installed the AddOn successfully and pointed it to the correct import data.

My issue is adding the .htaccess and index.php files to the old forum folder. The vBulletin forum was installed at "/forums/" which is the link for the existing forum as the XenForo software is installed in the web root folder.

This appears to be creating a conflict. I either need to change my forums link to forum (without the s) or find another solution - any help would be greatly appreciated!
 
I put in a route filter that changes forums/ to forum/ which has gotten me a bit further - google links that I am testing are routing me to a blank white page though.

Thoughts?
 
The route filter was not working, so I re-read the notes here.

After re-reading the import notes for vBulletin I am even more confused, perhaps you are after all of my posts as well. lol.

To be clear:

vBulletin on the old server was installed to samsmarine.com/forums/

XenForo on the new server is installed to the root (samsmarine.com) but I am redirecting to a specific page node for the home page. https://www.samsmarine.com/home/

The XenForo forums can currently be reached at samsmarine.com/forums/

I have the redirect AddOn installed and configured, but the redirects are not working.

I do not currently have .htaccess and index.php in a forums folder as that didn't seem to work as per the above two posts.

Any advice appreciated.

Thanks!
 
This appears to be creating a conflict. I either need to change my forums link to forum (without the s) or find another solution - any help would be greatly appreciated!
I can give you more info tomorrow but this is what I found worked. It doesn’t cover everything but seemed to cover the important stuff for most SEO.
This is for


Code:
RewriteEngine On

RewriteRule ^forums/forums(.*)$ /forums/$1 [R=301,NC,L]
RewriteRule ^forums/threads/(.*)$ /threads/$1 [R=301,NC,L]
RewriteRule ^forums/resources/(.*)$ /resources/$1 [R=301,NC,L]


Redirect 301 /forums/showthread.php https://logic-users-group.com/showthread.php
 
Last edited:
I recommend not mixing RewriteRules with Redirect directives.
They are not the handled by the same Apache module, and you can sometimes end up with things not operating in the order as expected. The reason is each module scans top to bottom, then the next module, etc. You're also adding the overhead, an extra scan.

Move the Redirect module from Apache, and replace
Code:
Redirect 301 /forums/showthread.php https://logic-users-group.com/showthread.php

with

RewriteRule ^forums/showthread\.php https://logic-users-group.com/showthread.php [R=301,L]
 
I can give you more info tomorrow but this is what I found worked. It doesn’t cover everything but seemed to cover the important stuff for most SEO.

This is for




Code:
RewriteEngine On

RewriteRule ^forums/forums(.*)$ /forums/$1 [R=301,NC,L]
RewriteRule ^forums/threads/(.*)$ /threads/$1 [R=301,NC,L]
RewriteRule ^forums/resources/(.*)$ /resources/$1 [R=301,NC,L]


Redirect 301 /forums/showthread.php https://logic-users-group.com/showthread.php
I am guessing that you are only using the "logic-users-groups.com" as an example URI.

I am not having an issue with duplicated 'forum/forum/...' links. All of my links are /forums/ or /forums/thread/

So I am still unclear as to what you are suggesting with the redirects here.

Am I also to assume that you are suggesting that these redirects go into the .htaccess in the root folder of the website, rather than the suggested location in the AddOn instructions?
 
I recommend not mixing RewriteRules with Redirect directives.
Thanks, I'll happily bow down to your better knowledge. Mine is limited and is often a bit of trial and error.
I am guessing that you are only using the "logic-users-groups.com" as an example URI.
No, this is what I have done on that actual forum
So I am still unclear as to what you are suggesting with the redirects here.
I thought you wanted to redirect out of a /forums/directory, which is exactly what my redirects on logic-users-group were for.
So I am still unclear as to what you are suggesting with the redirects here.
Sorry I may have misunderstood then, I though you wanted to redirect ou of /forums/ to the root and convert vB to xF
Am I also to assume that you are suggesting that these redirects go into the .htaccess in the root folder of the website, rather than the suggested location in the AddOn instructions?
I have them in the root and it is all seems to be working. e.g. old vBulletin URLs redirect out of /forums/ and to the correct thread on the xenForo installation that imported from vbulletin:

e.g.

http://www.logic-users-group.com/forums/showthread.php?t=4645

http://www.logic-users-group.com/forums/showthread.php?t=3070

I thought this is what you were after.
 
Last edited:
I appreciate the attempts at help here, so thanks for what I have read so far.

I need to redirect the old google indexed vBulletin links to the new XenForo links for the same thread.


should redirect to


however it is currently resolving to


so there is no rewrite happening on that link.

I have installed the XenForo redirects for vBulletin add-on as per the import notes for vBulletin. There is no link for this Add-on in the manual however, so perhaps I have the incorrect one?

As mentioned before -

  • The old vBulletin folder (and server) are now unreachable from the domain name
  • XenForo is installed in the ROOT directory of a new server
There was obviously a conflict with XenForo using /forums as the link to the forum list from root, so I have redirected that to /forum using a route filter.

That has allowed me to create a /forums folder on the new server to put the required assets into.

.htaccess in the /forums folder is setup as follows:
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 405 default
ErrorDocument 406 default
ErrorDocument 500 default
ErrorDocument 501 default
ErrorDocument 503 default

<IfModule mod_rewrite.c>
    RewriteEngine On

    #    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 /

    #    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>

index.php in the /forums folder is setup as follows:
Code:
<?php

// Enter the full path to your XenForo directory here:
$dir = '/home/samsmarine/www';
//$dir = '/home/username/public_html/xenforo2';

require($dir . '/src/XF.php');

XF::start($dir);
XF::runApp('XF301VB\Pub\App');

I note there is no closing ?> in that index.php file - I have closed it and re-uploaded the file - no change.

As this should be an "out of the box" redirect I feel like this should be easier. :D
 
As this should be an "out of the box" redirect I feel like this should be easier.
I am not sure it is and not sure why it would not be working, when my Logic forum was exactly the same, ie it was in the /forums/ directory on vBulletin and then imported to xenForo and moved to root.

I do not have the original /forums/ directory at all, it seems to be unnecessary if set up the way I have it.

Did you try what I suggested? Perhaps it's because I'm on an older xF (2.3.5) and older addon version (1.1.5)
 
Last edited:
I have another forum with original vbulletin 3 a in folder /forum/ and vb 4 in folder /community/

Redirects work for both very simply.

#exampe of vb 4 URL http://cafesaxophone.com/community/showthread.php?10559-Various-books
#exampe of vb 3 URL http://cafesaxophone.com/forum/showthread.php?t=1135
#exampe of vb 3 URL http://cafesaxophone.com/forum/showthread.php?t=1134

Again, I deleted the original /forum/ and /community/ folders.

I have this in root .htaccess

Code:
#redirects old vbulletin out of /community/

RewriteRule ^community/(.*)?$ /$1 [R=301,L]
RewriteRule ^forum/(.*)?$ /$1 [R=301,L]


<IfModule mod_rewrite.c>
    RewriteEngine On

    #    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 /community

    #    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>
 
Last edited:
Back
Top Bottom