Welcome to Our Community

Registration on our forums are now open for some days! Feel free to sign up today.

Unmaintained MyBB Forum URL Redirection Script 1.0

MyBB Redirection Script

  1. Caldexi
    This is a very simple redirection script, either download or copy below:
    PHP:
    <?php

    $startTime 
    microtime(true);
    $fileDir dirname(__FILE__);

    require(
    $fileDir '/library/XenForo/Autoloader.php');
    XenForo_Autoloader::getInstance()->setupAutoloader($fileDir '/library');

    XenForo_Application::initialize($fileDir '/library'$fileDir);
    XenForo_Application::set('page_start_time'$startTime);

    ####################

    // GET DB
    $db XenForo_Application::get('db');

    $_REQUEST['slug'] = (isset($_REQUEST['slug']) ? $_REQUEST['slug'] : '');

    $id $db->fetchOne("
        SELECT id
        FROM mybb_google_seo
        WHERE url = ?
        AND active = 1
        AND idtype = 3
    "
    $_REQUEST['slug']);

    if (
    $id)
    {
        
    header ('HTTP/1.1 301 Moved Permanently');
        
    header ('Location: http://yoursite.com/forums/' $id);
    }
  • About Us

    Our community has been around for many years and pride ourselves on offering unbiased, critical discussion among people of all different backgrounds. We are working every day to make sure our community is one of the best.
  • Like us on Facebook

  • Buy us a beer!

    The management works very hard to make sure the community is running the best software, best designs, and all the other bells and whistles. Care to buy us a beer? We'd really appreciate it!

    Donate to us!