• Welcome to Simple Machines Community Forum. Please login or sign up.
October 25, 2021, 09:42:01 AM

News:

SMF 2.1 RC4 has been released! Try it out and help us test! :) Read more.


Solution to invalid links after conversion from phpBB to smf

Started by janmartin, October 08, 2006, 08:49:12 AM

Previous topic - Next topic

janmartin

Hi all,

I converted a phpBB forum to smf.
Therefore a lot of bookmarked links to old phpBB files will no longer work.

My solution:
Create one file named phpBB2smf_redirect.php:

<?php
$phpBB2smf_redirect_target 
"http://www.mydomain.com/myfolder";
?>


Adjust it to your domain and folder.

Then for each phpBB file missing create a file with the following code (except index.php of course):

<?php
require(dirname(__FILE__)."/phpBB2smf_redirect.php");
header("Location: $phpBB2smf_redirect_target") ;
?>



Using this your visitors will be redirected to the new simple machines forum index.php when accessing an invalid link to a none-existing file of the old phpBB forum.

One could try to improve this by mapping old links like
hxxp:www.mydomain.com/myfolder/viewforum.php?f=1 [nonactive]
to
hxxp:www.mydomain.com/myfolder/index.php?board=1.0 [nonactive]

Feel free to develop this a bit. It could even become part of the converter!
Can it?

It might work for other forums than phpBB too.

Of course one could instead do some fancy stuff with the .htaccess file.

Jan

P.S.:
This should be all the old phpBB files you need to cover:

attach_rules.php
common.php
config.php
download.php
faq.php
groupcp.php
login.php
memberlist.php
modcp.php
posting.php
privmsg.php
profile.php
search.php
uacp.php
viewforum.php
viewonline.php
viewtopic.php

Advertisement: