Resource icon

Redirection Scripts for vBulletin 3.x 12.0

No permission to download

Slavik

XenForo moderator
Staff member
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.
 

Mr Lucky

Well-known member
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?
 

Chris D

XenForo developer
Staff member
These redirects are PHP scripts which replace your original VB files. They should work regardless of web server.
 

TheComputerGuy

Well-known member
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.
 

boeing747

Active member
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:

boeing747

Active member
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]
 

Sal Collaziano

Active member
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...
 
Top