Thread Redirection

Oliver.n

Member
I have moved from phpbb to xenforo, on the same website, in the same directory, phpbb files have now been removed. How do i re-direct old posts?

(I did not do the import, my co-admin did it)
 
This person recently did a phpBB import and posted his rewrite rules for redirects:

http://xenforo.com/community/threads/phpbb-redirect-rules.30314/

In his case he selected the option at the beginning of the import to preserve the source ids. That is why he can do a straight rewrite without using the redirect scripts.

If you didn't preserve the source ids then you need to upload the redirect scripts and then use rewrite rules like this to map the old URLs to the redirect scripts:

Code:
RewriteEngine on
 
RewriteCond %{QUERY_STRING} (^|&)t=([0-9]+)(&|$) [NC]
RewriteRule ^viewtopic\.php$ showthread.php?t=%2? [L,R=301,NC]
RewriteCond %{QUERY_STRING} f=(\d+)$ [NC]
RewriteRule ^viewforum\.php$ forumdisplay.php?f=%1? [L,R=301,NC]

If you need help with this then I can take a look if you are comfortable giving me FTP access to your server.
 
Ok but it's not vbulletin, it's phpbb so i need to upload one of those redirect files to the root? Or do i add this to .htaccess

RewriteEngine on

RewriteCond %{QUERY_STRING} (^|&)t=([0-9]+)(&|$) [NC]
RewriteRule ^viewtopic\.php$ showthread.php?t=%2? [L,R=301,NC]
RewriteCond %{QUERY_STRING} f=(\d+)$ [NC]
RewriteRule ^viewforum\.php$ forumdisplay.php?f=%1? [L,R=301,NC]
 
Ok which one should i use then, any? Sorry, im a bit confused.

1) Upload these redirect scripts:

http://xenforo.com/community/threads/redirection-scripts-for-vbulletin-3-x.5030/

2) Add these rewrite rules to your .htaccess file:

Code:
RewriteEngine on
 
RewriteCond %{QUERY_STRING} (^|&)t=([0-9]+)(&|$) [NC]
RewriteRule ^viewtopic\.php$ showthread.php?t=%2? [L,R=301,NC]
RewriteCond %{QUERY_STRING} f=(\d+)$ [NC]
RewriteRule ^viewforum\.php$ forumdisplay.php?f=%1? [L,R=301,NC]

That's it. That will redirect thread and forum URLs.
 
These are mine from when I did my conversion from phpBB 3.0.10:

both are in the /forum directory.

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|viewtopic\.php)$ /forum/forums/%1? [L,R=301,NC]
        RewriteCond %{QUERY_STRING} (^|&)p=([0-9]+)(&|$) [NC]
        RewriteRule ^viewtopic\.php$ /forum/posts/%2? [L,R=301,NC]
 
Top Bottom