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
STN
Registered User
Posts: 12
Joined: Sat Sep 04, 2010 8:25 pm

xenforo to phpbb redirect script

Post by STN » Fri Aug 24, 2018 10:17 pm

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?

STN
Registered User
Posts: 12
Joined: Sat Sep 04, 2010 8:25 pm

Re: xenforo to phpbb redirect script

Post by STN » Sat Aug 25, 2018 2:21 am

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

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

For threads
RewriteRule ^threads/([^/]+)\.([0-9]+)(/)?(.*)$ http://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”

Who is online

Users browsing this forum: No registered users and 2 guests