1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

PhpBB3 redirection

Discussion in 'Tips and Guides [Archive]' started by Corwin, Feb 21, 2012.

  1. Corwin

    Corwin Member

    I just migrated from phpBB3 to Xenforo with integrated importer. Everything was ok... but links redirection was a problem. But it's easy with conversion from phpbb3, you will need only to add few lines to .htaccess

    Here are that lines.

    Code:
            RewriteCond %{QUERY_STRING} (^|&)t=([0-9]+)(&|$) [NC]
            RewriteRule ^viewtopic\.php$ /threads/%2? [L,R=301,NC]
            RewriteCond %{QUERY_STRING} f=(\d+)$ [NC]
            RewriteRule ^viewforum\.php$ /forums/%1 [L,R=301,NC]
    Add them before that line
    Code:
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    This 4 lines will redirect all forums and threads to XenForo.
     
  2. MattW

    MattW Well-Known Member

    Hi Corwin, are you using these re-write rules with full SEO URL's? I've added the above into my .htaccess file, but link re-direction doesn't seem to be working.
     
  3. MattW

    MattW Well-Known Member

    I managed to figure it. I needed to add the forum folder into the rewrite rule, as my forum is in .co.uk/forum

    Code:
    RewriteCond %{QUERY_STRING} (^|&)t=([0-9]+)(&|$) [NC]
    RewriteRule ^viewtopic\.php$ /forum/threads/%2? [L,R=301,NC]
    RewriteCond %{QUERY_STRING} f=(\d+)$ [NC]
    RewriteRule ^viewforum\.php$ /forum/forums/%1 [L,R=301,NC]
     
  4. Corwin

    Corwin Member

    Hi MattW, I'm using with full SEO. I see you resolved that problem. I forgot to mention that my forum is installed in top level directory.

    Is your redirection working properly right now?
     
    MattW likes this.

Share This Page