• Welcome to XF2 Addons. You can buy my Premium membership for $35 per year, and this gives you access to download any or ALL of the 335 add-ons that I have developed for Xenforo 2.x. In addition, Premium members will get technical support. Once the Premium membership has expired you can continue to use the installed addons on your forum as long as you like.

Redirects using .htaccess


Andy

Administrator
Staff member
Instructions for redirecting from vB4 to XenForo

vB4 URL types:

Standard URLs: showthread.php?t=12345
Basic Friendly URLs: showthread.php?1234-Thread-Title
Advanced Friendly URLs: showthread.php/1234-Thread-Title
Mod Rewrite Friendly URLs: threads/1234-Thread-Title
 

Andy

Administrator
Staff member
RewriteRule should be placed where the red arrow is pointing:

1595867525341.png
 

Andy

Administrator
Staff member
RewriteRule for vB4 Advanced Friendly URLs.

RewriteRule ^[^/]+/([0-9]+)-[^\./]+\.html$ /showthread.php?t=$1 [NC,L]

This requires a file called showthread.php to be located in the public_html folder. Replace domain.com with your forum URL.

PHP:
<?php

$t = $_GET['t'];

if (!empty($t))
{
    header ('Location: https://www.domain.com/threads/' . $t . '/',TRUE,301);
}
 

Similar threads

Top