Redirects using showthread.php and showpost.php


Andy

Administrator
Staff member
If you imported from vBulletin and have used standard URLs like this

showthread.php?t=12345

then all you have to do is create these two files and place them in the forums folder.

showthread.php
PHP:
<?php

$t = $_GET['t'];
$p = $_GET['p'];

if ($t != '' AND $p == '')
{
    header ('Location: https://www.domain/forums/threads/' . $t . '/',TRUE,301);
}

if ($p != '')
{
    header ('Location: https://www.domain.com/forums/posts/' . $p . '/',TRUE,301);
}

showpost.php
PHP:
<?php

$p = $_GET['p'];

header ('Location: https://www.domain.com/forums/posts/' . $p . '/',TRUE,301);
 

Similar threads

Top