Redirection Scripts for vBulletin 3.x

Redirection Scripts for vBulletin 3.x 12.0

No permission to download
I'm a bit confused, is this supposed to work for vbulletin 3 and 4, or only work for vb3?

If you didnt change your vb4 url settings and left them the same as vb3 eg showthread.php?t={id here} they will work.
 
It may work with vB4.

No, it just redirects to the home page

If you didnt change your vb4 url settings and left them the same as vb3 eg showthread.php?t={id here} they will work.

My vbulletin URLs did change, and so you are correct, not working.

I had the xf1 vb4 redirection in my xf1 before upgrading and that was working, so it looks like we do need a new vb4 redirect. Is this something xenforo would do, or will it be up to a 3rd party developer?
 
These redirects are PHP scripts which replace your original VB files. They should work regardless of web server.
 
These redirects are PHP scripts which replace your original VB files. They ahould work regardless of web server.
So, i moved from /forums/ to the root. So I'm unfortunately not able to put them into the original vB files, as they would cause an issue with the current xF setup.
 
Hello,

I have problem with those addresses which have archived.

These kind of addresses:

will redirect to this path:

htaccess:
Apache config:
RewriteOptions inherit
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
RewriteRule thread([\d]+)/page([\d]+)/ showthread.php?t=$1&page=$2 [NC,L]
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
RewriteRule thread([\d]+)/ showthread.php?t=$1 [NC,L]
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
RewriteRule forum([\d]+)/page([\d]+)/ forumdisplay.php?f=$1&page=$2 [NC,L]
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
RewriteRule forum([\d]+)/ forumdisplay.php?f=$1 [NC,L]
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
RewriteRule thread([\d]+)-([\d]+) showthread.php?t=$1 [NC,L]
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
RewriteRule thread([\d]+)-new-post showthread.php?t=$1 [NC,L]
RewriteCond %{HTTP_HOST} ^https://myforum.com [NC]
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$


RewriteRule ^forums/forum\.php$ /forums/ [R=301,L]

RewriteRule ^forums/forumdisplay\.php/([0-9]+)-.*$ /forums/$1/ [R=301,L]

RewriteRule ^forums/member\.php/([0-9]+)-.*$ /members/$1/ [R=301,L]

RewriteRule ^forums/showthread\.php/([0-9]+)-.*$ /threads/$1/ [R=301,L]




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}]

# 301 redirect to https
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]


    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
    RewriteRule ^.*$ - [NC,L]
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
    RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml) - [NC,L]
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
    RewriteRule ^.*$ index.php [NC,L]
</IfModule>
 
Last edited:
I found the solution.
If someone faced with this issue, just add this rewrite rule to your htaccess

Apache config:
#Redirect archive thread links
RewriteRule ^archive/index\.php/t-([0-9]+)-p-([0-9]+)\.html$ /index.php?threads/$1/ [R=301,L]
 
Hey..... So.... This isn't working anymore? I have a pretty basic conversion of vB3 using the same folder structure... It would be great to have these redirects working... I plan on converting ALL my vB3s (quite a few) and got started on that a year or so ago. I have about 5 done so far and these redirect scripts used to work perfectly...
 
Pretty sure I am still running this, but I am seeing a quite severe issue. Are 404 showthread.php links redirected to the homepage? I am seeing this with my site. Is that part of the logic?
 
XF has committed an SEO sin with this script. If a thread, member profile or post doesn't exist, instead of a 404, they redirect to the homepage. This is really really horrible. Especially if you removed a lot of spam. Guess what, once you install this, all those spam links are now redirecting to your homepage.

if (!$target)
{
$target = $router->buildLink('canonical:index');
}
 
Top Bottom