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

XF 1.5 Phpbb to Xenforo URL redirection

Discussion in 'XenForo Questions and Support' started by mastera, Sep 21, 2016.

  1. mastera

    mastera Member

    Hi,

    I recently moved from Phpbb to Xenforo and I need to make the old URLs link to the new URLs as they are different. How can I do that?

    Thanks.
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

  3. mastera

    mastera Member

  4. Mike

    Mike XenForo Developer Staff Member

    Can you give some example URLs?
     
  5. mastera

    mastera Member

    Xenforo URL: forum/threads/hello-goodbye-thread-4.126282/
    Phpbb URL: forum/viewtopic.php?f=24&t=126282
     
  6. Mike

    Mike XenForo Developer Staff Member

  7. mastera

    mastera Member

  8. Mike

    Mike XenForo Developer Staff Member

    If you're running Nginx, you're going to need an alternative to the rewrite rule as .htaccess doesn't do anything. (This is a good example of where running Nginx requires additional technical knowledge).

    I have not tried this, but the following may work:
    Code:
    location ~ /forum/(viewforum|viewtopic)\.php$ {
    try_files /xf/phpbb.php?$uri&$args =404;
    }
     
  9. mastera

    mastera Member

    Where should I use this? In .htaccess?
     
  10. Mike

    Mike XenForo Developer Staff Member

    In the appropriate block in your Nginx config. (If you want to use .htaccess files, you need to use Apache.)
     

Share This Page