1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'Installation, Upgrade, and Import Support' started by a.tushkanov, Mar 13, 2014.

  1. a.tushkanov

    a.tushkanov Active Member

  2. Brogan

    Brogan XenForo Moderator Staff Member

  3. a.tushkanov

    a.tushkanov Active Member

    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
     
  4. RoldanLT

    RoldanLT Well-Known Member

    He is using url's without .html or .php extension, closely similar to XenForo has.
    Maybe @Jake Bunce and @Mike can add some more suggestion.
     
  5. a.tushkanov

    a.tushkanov Active Member

  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    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.
     
    a.tushkanov likes this.
  7. Sentenza

    Sentenza Member

    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: Mar 17, 2014
  8. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

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

    Sentenza Member

    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/
     
  10. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    @Sentenza

    Add these rules to the top of the .htaccess file in your web root:

    Code:
    RewriteEngine On
    
    RewriteRule ^forums/(viewtopic\.php)$ /$1 [R=301,L]
    
    That will remove the "forums" part at which point your addon should kick in.
     
    a.tushkanov likes this.
  11. RoldanLT

    RoldanLT Well-Known Member

    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: Mar 19, 2014
  12. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    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:

    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]
    
     
    a.tushkanov and RoldanLT like this.
  13. a.tushkanov

    a.tushkanov Active Member

    RoldanLT likes this.

Share This Page