XF 1.3 Redirecting from PhpBB

Kean

Member
Hello,

I am about to buy over a forum and we're about to finalize the deal. The forum is currently using phpbb with the default urls (non-SEO friendly).

I would like to know how do I redirect the urls to seo friendly xf urls just before I take over the forum so that I'll be able to make the move asap.

I've read a couple of threads but am still a little confused as to which code to use.
 
There are lots of examples if you search. But redirects are always specific to your site. If you post an example old and new thread URL (the same thread from both phpBB and XF) then I can provide exact instructions for your redirects.
 
There are lots of examples if you search. But redirects are always specific to your site. If you post an example old and new thread URL (the same thread from both phpBB and XF) then I can provide exact instructions for your redirects.

Hello Jake, here are the examples of old and new URLs.

Old: viewtopic.php?f=18&t=389
New: threads/forum-upgrades-login-issues.389/

Is there also a way to redirect the forum URLs itself? For example, from:

Old: viewforum.php?f=18
to
New: forums/announcements.18/
 
Hello Jake, here are the examples of old and new URLs.

Old: viewtopic.php?f=18&t=389
New: threads/forum-upgrades-login-issues.389/

Is there also a way to redirect the forum URLs itself? For example, from:

Old: viewforum.php?f=18
to
New: forums/announcements.18/

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

Code:
RewriteEngine On

RewriteCond %{QUERY_STRING} (^|\?)f=([0-9]+)&t=([0-9]+)($|&)
RewriteRule ^viewtopic\.php$ /threads/%3/? [R=301,L]

RewriteCond %{QUERY_STRING} (^|\?)f=([0-9]+)($|&)
RewriteRule ^viewforum\.php$ /forums/%2/? [R=301,L]
 
Hi @Jake Bunce ! How about with these urls?

Old: pinoyexpatforum.com/viewtopic.php?f=36&t=1212
New: pinoyexpatforum.com/index.php?threads/how-to-process-haad-dataflow.1212/

Will it be the same with that code?

Slightly different since you don't use friendly URLs.

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

Code:
RewriteEngine On

RewriteCond %{QUERY_STRING} (^|\?)f=([0-9]+)&t=([0-9]+)($|&)
RewriteRule ^viewtopic\.php$ /index.php?threads/%3/ [R=301,L]

RewriteCond %{QUERY_STRING} (^|\?)f=([0-9]+)($|&)
RewriteRule ^viewforum\.php$ /index.php?forums/%2/ [R=301,L]
 
Waaahh!!!!! I just realized that I could not see the .htaccess file because it was hidden. I kept changing the htaccess.txt not realizing I wa editing the wrong file. Now it works perfectly! I'm really happy! Thanks a lot!
 
Top Bottom