SMF Support > IPB
IPB -> SMF old links handling
(1/1)
octopus22:
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
Oldiesmann:
index.php
Find
--- Code: --- elseif (empty($_REQUEST['action']))
{
--- End code ---
Add after that
--- Code: --- 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);
}
--- End code ---
The 301 Moved Permanently header is to tell search engines that the old URL should be updated with the new URL.
octopus22:
code works with '.' instead of ','
and no any result... http://osravers.com/index.php?showtopic=6471
tempster:
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?
Navigation
[0] Message Index
Go to full version