old IPB has links like this:
index.php?showtopic=6971
and after convert SMF create links:
index.php/topic,6971.0.html
or
index.php?topic=9148.0
how can i handle old links?
if i want just to redirect from "showtopic=" to "topic="
thanks for advise
index.php
Find
elseif (empty($_REQUEST['action']))
{
Add after that
if(isset($_REQUEST['showtopic']))
{
$location = (!empty($modSettings['queryless_urls'])) ? '/topic,', $_REQUEST['showtopic'], '.0.html' : '?topic=', $_REQUEST['showtopic'], '.0';
header('HTTP/1.1 301 Moved Permanently');
header('Location: ', $scripturl . $location);
}
The 301 Moved Permanently header is to tell search engines that the old URL should be updated with the new URL.
code works with '.' instead of ','
and no any result... http://osravers.com/index.php?showtopic=6471
anyone have any new tips on how to preserve (or redirect) old ipb urls after converting to smf to avoid disruption to search engine listings and rankings?