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

XF 1.2 phpbb3 to XF redirect

#1
Sorry to create another redirect thread but I can't seem to get any of the tutorial/ write-ups to work with my site. I just successfully imported my phpbb3 site to XenForo but now when I try to redirect my old links nothing works.

My old link is http://www.mossbergowners.com/viewforum.php?f=17
and that should be redirected to
http://www.mossbergowners.com/forum/index.php?forums/mossberg-500-pump-action.17/

Note: my phpbb site was installed on the root directory and the new XF install is on a sub folder called forum.

Could anyone guide me in the right redirects as to how i can get the redirects to work.

Thanks,
Phil
 

Jake Bunce

XenForo moderator
Staff member
#2
Add these rules to the top of the .htaccess file in your web root:

Code:
RewriteEngine On

RewriteCond %{QUERY_STRING} (^|\?)f=([0-9]+)(&|$)
RewriteRule ^viewforum\.php$ /forum/index.php?forums/%2/ [R=301,L]
 
#3
Thanks for the reply. Unfortunately that still didnt work. Im not sure what im doing wrong. I added the lines in my forum folders .htaccess file which is the folder where my new install of Xenforo is but the old links still dont redirect. Do you know what I am doing wrong?

Thanks
 
#5
I didnt have a.htaccess file in my web root. So I created one and added those lines to it. but im not sure that is correct because it still doesnt seem to be working. Thanks again for your help.