Resource icon

xF1 Add-on Redirection script for SMF 2.0 1.0

No permission to download
Compatible XF Versions
  1. 1.5
Additional Requirements
XenForo:
"Retain imported content IDs" during SMF import.
"Use Full Friendly URLs" should be enabled in XenForo.
"Include Content Title in URLs" might be enabled but It will give you an extra redirect. (personally I don't like Titles in URLs)

SMF:
This script is designed for default SMF URLs. If you enabled "Search engine friendly URLs" in SMF, the redirection will not work with this script.
This script will redirect your SMF forum URL's to XenForo.
The reason I didn't use .htaccess or Nginx rewrites is because the redirects needed some simple math. This was not easily possible with .htaccess / nginx.

Usage
Replace your SMF index.php with this redirect script and edit the configuration part.
I'll assume you installed XenForo in a new directory. This will make things much easier!
If you are going to install SMF and XenForo in the same directory, you will need to do some extra redirects in .htaccess/nginx which filters the SMF requests and directs them to this script.

You should test this script before the real migration. Make sure everything works.

Configuration
Just edit the first part of the script to suite your needs:
PHP:
$redir_url = 'https://www.domain.com/smf'; // URL of your new forum, without trailing slash
$forums = 'forums'; // URL name of forums (only change this if you are using route filters)
$threads = 'threads'; // URL name of threads (only change this if you are using route filters)
$posts = 'posts'; // URL name of posts (only change this if you are using route filters)
$members = 'members'; // URL name members (only change this if you are using route filters)
$threads_count = 10; // Make sure the number of threads is the same for SMF and XenForo.
$mode = 0; // 0 = testing / 1 = temp redirect / 2 = perm redirect
First you should use mode = 0 to see what the redirect is doing, after that you can use mode = 1 to test the real thing. After that, if everything is fine, use mode = 2.

Example Redirections

Boards
http://www.domain.com/smf/index.php?board=5.20
to
http://www.domain.com/xenforo/forums/5/

Messages
https://www.domain.com/smf/index.php?msg=123
to
https://www.domain.com/xenforo/posts/123/

https://www.domain.com/smf/index.php?topic=10.msg123
to
https://www.domain.com/xenforo/posts/123/

Topics
https://www.domain.com/smf/index.php?topic=10.110
to
https://www.domain.com//xenforo/threads/10/page-12

Profiles
https://www.domain.com/smf/index.php?action=profile;u=123
to
https://www.domain.com/xenforo/members/123/
  • Like
Reactions: memo41
Author
Josh
Size
1.1 KB
Extension
zip
Downloads
3
Views
1,616
First release
Last update

Similar resources

0.00 star(s) 0 ratings
Downloads
7
Updated
Redirects for vBulletin 3's showthread.php, forumdisplay.php, etc URLs to XenForo for SEO
0.00 star(s) 0 ratings
Downloads
12
Updated
vBulletin 4.x URL Redirection AnimeHaxor
Adds support for the new URL structures in vB4 to the vB3 redirection scripts
0.00 star(s) 0 ratings
Downloads
8
Updated
Export and Upload your Database to Offsite location with Cron
0.00 star(s) 0 ratings
Downloads
12
Updated
Kotomi - Generic script bridge AnimeHaxor
Developer sample for basic script embedding
0.00 star(s) 0 ratings
Downloads
41
Updated