XF 1.3 Redirects after phpBB 2.x to XF 1.3 import

It's not i think as needed. Cause ex. are:
"/viewforum.php?f=X" should now redirect to "/index.php/forums/X/" and
"/viewtopic.php?t=X" should now redirect to "/index.php/threads/X/" and
"/viewtopic.php?p=X" should now redirect to "/index.php/posts/X/".

But we need to have node and thread name in url... not just id's
 
Add these rules to the top of the .htaccess file in your web root:

Code:
RewriteEngine On

RewriteRule ^viewforum/f/([0-9]+)/$ /f/$1/ [R=301,L]
RewriteRule ^viewtopic/t/([0-9]+)/$ /t/$1/ [R=301,L]
RewriteRule ^viewtopic/p/([0-9]+)/$ /p/$1/ [R=301,L] #this one uses XF's "posts" route for the post_id, which I'm assuming you have changed to /p


This one cannot be done with rewrite rules. A custom script is required to convert the page numbers.
 
The addon works, but the path still is not right.
Rewrite rule
Code:
RewriteRule ^(viewforum|viewtopic)\.php phpbb.php [NC,L]

This is the old path and new redirect path from phpbb:
Code:
www.domain.com/forums/viewtopic.php?f=23&t=7109

And I need a redirect to this:
Code:
www.domain.com/viewtopic.php?f=23&t=7109

Can anybody help me please?
 
Last edited:
The addon works, but the path still is not right.
Rewrite rule
Code:
RewriteRule ^(viewforum|viewtopic)\.php phpbb.php [NC,L]

This is the old path and new redirect path from phpbb:
Code:
www.domain.com/forums/viewtopic.php?f=23&t=7109

And I need a redirect to this:
Code:
www.domain.com/viewtopic.php?f=23&t=7109

Can anybody help me please?

Those are both phpBB URLs. Do you need to redirect both to XF? What is the new XF URL for each link?
 
Those are both phpBB URLs. Do you need to redirect both to XF? What is the new XF URL for each link?

Yes, but the addon redirect the phpbb URLs to the right XF URLs. I need only the path without "forums".

Or I remove the addon and we make a redirect to the XF URL?
The right XF URL was
Code:
www.domain.com/threads/7109/
 
Add these rules to the top of the .htaccess file in your web root:

Code:
RewriteEngine On

RewriteRule ^viewforum/f/([0-9]+)/$ /f/$1/ [R=301,L]
RewriteRule ^viewtopic/t/([0-9]+)/$ /t/$1/ [R=301,L]
RewriteRule ^viewtopic/p/([0-9]+)/$ /p/$1/ [R=301,L] #this one uses XF's "posts" route for the post_id, which I'm assuming you have changed to /p



This one cannot be done with rewrite rules. A custom script is required to convert the page numbers.
With post redirect, from (phpbb2): http://forum.blabla.ru/viewtopic/p/924270/#924270
It redirected to (xenforo) http://forum.blabla.ru/p/924270/#924270 (which is 404 page)
Should be http://forum.blabla.ru/t/thread-name-here.924270/#post-924270

Any suggestion @Jake Bunce ?
Thanks !
 
Last edited:
With post redirect, from (phpbb2): http://forum.blabla.ru/viewtopic/p/924270/#924270
It redirected to (xenforo) http://forum.blabla.ru/p/924270/#924270 (which is 404 page)
Should be http://forum.blabla.ru/t/thread-name-here.924270/#post-924270

Any suggestion @Jake Bunce ?
Thanks !

The postid must use the posts route in XF (which then redirects to the appropriate page and anchor like you want). What is your posts route? You renamed your other routes so I assumed posts was p. If you didn't change the posts route then use this:

Rich (BB code):
RewriteEngine On

RewriteRule ^viewforum/f/([0-9]+)/$ /f/$1/ [R=301,L]
RewriteRule ^viewtopic/t/([0-9]+)/$ /t/$1/ [R=301,L]
RewriteRule ^viewtopic/p/([0-9]+)/$ /posts/$1/ [R=301,L]
 
Back
Top Bottom