MyBB Community Forums

Full Version: i have merge from vb4 but i have rewrite rule problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
In the name of God the Merciful

i have merge from vb4 but i have rewrite rule problem

i want to Redirect from showthread.php?t= to redirect.php?tid=

like this

RewriteRule ^showthread.php?t=([1-9][0-9]*)$ redirect.php?tid=$1 [L,QSA,NC]


but it not work

any help please

[Image: do.php?imgf=13548513011.jpg]
You need RewriteCond to match the query string.

Alternatively, if it's showthread.php (same filename as MyBB), you can just hook into global_start with this code:

global $mybb, $settings;
if(THIS_SCRIPT == 'showthread.php' && $mybb->input['t'])
{
    header("Location: {$settings['bburl']}/redirect.php?tid=".(int)$mybb->input['t'], 301);
    exit;
}

Or put the redirect.php code there in the first place.
thank you very much
you are the best