xenforo to phpbb redirect script

Converting from other board software? Good decision! Need help? Have a question about a convertor? Wish to offer a convertor package? Post here.
Post Reply
User avatar
Maks33
Registered User
Posts: 57
Joined: Sat Sep 04, 2010 8:25 pm
Contact:

xenforo to phpbb redirect script

Post by Maks33 »

Hey

Anyone good enough in htaccess can write a script for converting from xenforo urls to phpbb?

I recently converted from xenforo2 to phpbb and the big issue now is redirecting xenforo urls to phpbb. Google yields nothing except scripts to do the reverse (phpbb to xf).

xf urls> threads/the-swords-of-ditto.6562/
phpbb> viewtopic.php?t=

xf> members/blah.20244/
phpbb > memberlist.php?mode=viewprofile&u=20244

I can write basic redirection but can't figure out how to get the ID number from url and put it in phpbb url.

Some help please?
User avatar
Maks33
Registered User
Posts: 57
Joined: Sat Sep 04, 2010 8:25 pm
Contact:

Re: xenforo to phpbb redirect script

Post by Maks33 »

Nevermind, ended up writing it myself. Here it is for anyone else in need of it.

For members
RewriteRule ^members/([^/]+)\.([0-9]+)(/)?(.*)$ https://fearlessrevolution.com/memberli ... ofile&u=$2 [R=301,L]

For threads
RewriteRule ^threads/([^/]+)\.([0-9]+)(/)?(.*)$ https://fearlessrevolution.com/viewtopic.php?t=$2 [R=301,L]

It will redirect threads/blah.831/ and even threads/blah.831/#post-3255 without fail but append the #post-3255 at the end. I couldn't figure out how to remove that and wasn't bothered anyway since Google mostly cares about the topic id. Will also redirect pages without fail but not to the correct page so you do end up with the correct 301 to topic but NOT to the correct page.

Now hoping Google notices it and reindexes the member profiles. They were indexed but with nothing showing up.

Cheers :)
Post Reply

Return to “[3.2.x] Convertors”