XenForo Redirects for vBulletin

XenForo Redirects for vBulletin 1.1.9

No permission to download
what if its automatic system which just marks something as unmaintained when no updates for a while? What is there to update exactly?

People need to calm down, it's working perfectly fine on my forum.
 
For anyone trying to fix this addon on nginx this is the post you need to read:

The problem is the friendly-URL nginx code snippet shown in the manual:
Code:
location /xf/ {
    try_files $uri $uri/ /xf/index.php?$uri&$args;
    index index.php index.html;
}

location /xf/install/data/ {
    internal;
}

location /xf/install/templates/ {
    internal;
}
location /xf/internal_data/ {
    internal;
}
location /xf/library/ {
    internal;
}

location ~ \.php$ {
    try_files $uri =404;
    fastcgi_pass    127.0.0.1:9000;
    fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include         fastcgi_params;
}

The problematic part is the try_files in the php-location. It serves as a security precaution to only send existing .php-files to the backend. But in our redirection-scenario files like showthread.php do not exist...

The remedy is to also redirect to index.php in this section like this:

Code:
try_files $uri /xf/index.php?$uri&$args;

This is safe because XF's route controller will check the passed arguments and XF301VB routes accordingly.

Just change the block to look like this:

NGINX:
  location ~ \.php$ {
      try_files $uri /index.php?$uri&$args;
      #try_files $uri =404;
      fastcgi_pass    127.0.0.1:9000;
      fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;
      include         fastcgi_params;
  }

Works fine after that. This issue probably has affected many people, idk if maybe a change to documentation or some alternative workaround is relevant, just a suggestion to make everyone's Xenforo experience as painless as possible.
 
Last edited:
Update/Warning: the above ^ fix doesn't work perfectly afterall, I checked my logs and certain URLs are redirecting to "domain.com/domain.com/" using that method. Not sure what the fix is now :(
 
I feel like I'm spamming here but I opened a ticket and was instructed to post here. I want to inform the person in charge of this addon that it does not work on nginx, I see 3-4 people in this thread all reporting the same issue.

I understand this addon is provided as a courtesy, but I think this is an important issue due to the number of Xenforo forums that were upgraded from vbulletin. As a loyal customer who loves everything about Xenforo, I think this should this should be resolved. Thank you
 
Have issues on nginx as well, though for showthread.php and member.php links (from old vBulletin), I used the following nginx rewrite:

NGINX:
        location = /showthread.php {
           return 301 /threads/$arg_t/;
        }

        location = /member.php {
           return 301 /members/$arg_u/;
        }

Which appears to work perfectly for non-friendly vBulletin URL's.
 
What are people having issues with exactly? vBulletin's Friendly URL already uses the similar same friendly URL that Xenos is using. EG:

vBulletin: websitehere/threads/12345-titlehere
XenForo: websitehere/threads/titlehere.12345/

So technically as long the thread ID remains the same, it should work on XenForo. Just from what I can see, basic URL's that include for example showthread.php won't properly forward giving a 404.
 
Have issues on nginx as well, though for showthread.php and member.php links (from old vBulletin), I used the following nginx rewrite:

NGINX:
        location = /showthread.php {
           return 301 /threads/$arg_t/;
        }

        location = /member.php {
           return 301 /members/$arg_u/;
        }

Which appears to work perfectly for non-friendly vBulletin URL's.

This does not work for me it redirecs to "domain.com/threads//" hmmm

So technically as long the thread ID remains the same, it should work on XenForo. Just from what I can see, basic URL's that include for example showthread.php won't properly forward giving a 404.

Nothing redirects using this addon on nginx, that is the experience of myself and a couple others. The other possibility is me and the others all have another common factor screwing up the redirects besides simply using nginx.
 
In the file XF301VB/Pub/Controller/Redirect there is the method:
PHP:
    public function actionAttachment(ParameterBag $params)
    {
        if ($params->filedataid)
        {
            return $this->redirectContent($params, 'attachment_filedata', 'XF:Attachment', 'attachments',
                $params->filedata_id);
        }
        else
        {
            return $this->redirectContent($params, 'attachment', 'XF:Attachment', 'attachments');
        }
    }

The code checks if $params->filedataid is set and then uses $params->filedata_id. From what I can tell it would never go into the then-clause.

---

Also, this add-on does not work for me at all. My old vBulletin 3 forum was in /forums and XenForo is in / and no links are redirected. I inspected the Router and found that all links come in as forums/showthread.php, etc.. I have this Nginx configuration:
Code:
try_files $uri /index.php?$uri&$args;
index index.php index.html;

location ~ \.php$ {
  try_files $uri /index.php =404;
  fastcgi_pass    php:9000;
  fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;
  include         fastcgi_params;
}

---

Also. Why does this add-on not support the official XFMG add-on? Is there an extension for it somewhere?
 
Last edited:
This does not work for me it redirecs to "domain.com/threads//" hmmm



Nothing redirects using this addon on nginx, that is the experience of myself and a couple others. The other possibility is me and the others all have another common factor screwing up the redirects besides simply using nginx.
I do no redirects at all on the nginx-site. All is done within the addon.

My changes to the config I proposed (and use successfully) just make sure that requests to non-existing php-files (like showthread.php) are properly passed to index.php (and thus the addon to handle it).

Just make sure that you do NOT have any other php-files hanging around (like showthread.php, member.php ...) because they will take precedence and the redirection at the end will not work.

HTH
-Markus
 
My vBulletin 4.x www.purebibleforum.com is coming over to a new Xenforo 2.x

Full forum overwrite, can be done multiple times in test mode.

What is the timing for the add-on to be used?

If we do the migration to an IP addy on another server, and then backup and delete the original vBulletin forum, and then change the DNS so the new forum is officially live.

Is that a bit late for using this add-on?

(Hopefully, this is a sensible question.)

The need is light, mostly for the internal forum urls, but it would be nice if urls in places like Facebook or CARM forums maintain their integrity.
 
You would implement the redirection once the XF installation is live and in its final location (URL).
 
most of my issues have been resolved, I did so many changes that I can't figure out what I did to fix it tho.

I am using this in combination with the addon:

The problem is the friendly-URL nginx code snippet shown in the manual:
Code:
location /xf/ {
    try_files $uri $uri/ /xf/index.php?$uri&$args;
    index index.php index.html;
}

location /xf/install/data/ {
    internal;
}
location /xf/install/templates/ {
    internal;
}
location /xf/internal_data/ {
    internal;
}
location /xf/library/ {
    internal;
}

location ~ \.php$ {
    try_files $uri =404;
    fastcgi_pass    127.0.0.1:9000;
    fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include         fastcgi_params;
}

The problematic part is the try_files in the php-location. It serves as a security precaution to only send existing .php-files to the backend. But in our redirection-scenario files like showthread.php do not exist...

The remedy is to also redirect to index.php in this section like this:

Code:
try_files $uri /xf/index.php?$uri&$args;

This is safe because XF's route controller will check the passed arguments and XF301VB routes accordingly.


HTH,
-Markus

Is anyone using this fix checking there PHP error log and seeing this kind of incorrect redirect?

Code:
open() ""/public/threads/ThreadName.123/styles/default/xenforo/reactions/emojione/sprite_sheet_emojione.png" failed (2: No such file or directory)

It should just be getting /styles/default/xenforo/reactions/emojione/sprite_sheet_emojione.png

I get about 50 of these per day but I can't personally reproduce it, it happens at random but my IP never triggers it even tho I browse the site more than anyone else.
 
Hi,

After the Redirection Add-on is placed in its new home:
I am trying to do

vBulletin import log table:

Where two file choices are offered.

xp_post_backup
import_log_vbulletin4_1

The first one is not an import table, I am told
The second one allows me to hit "Save" but nothing visible happens or changes.

Can you help me understand what I am missing?

var/iib/mysql/xfdata

There are two files:
import_log_vbulletin4_1.ibd 500K
import_log_vbulletin4_1.frm 1.6K

The ibd file does look like real data, with lots of thread numbers!

Thanks!

Steven
 
The second one allows me to hit "Save" but nothing visible happens or changes.

If it saves in Options for the Redirection addon, it should be working.

Do a Google search site:yourdomain.com

That should show you some old pre-Xenforo links. Click on one or two and it should redirect you to the Xenforo pages.
 
Nah, none forwarded.

The only one that worked was one where Google was showing the ip number, rather than the url name.

Do I have any plan B?
It was curious that there was no confirmation or time delay.

Presumably Google might catch up over time.

Plus I can use, and maybe enhance by plug—in, the internal search.

However, nothing would match real redirection.
The migration could be done again, nothing really has been changed.

Would there be hope of a better result? ... hmmmm ... any tech analysis possible?
 
Top Bottom