Skip to:

Redirection to new bbPress board?

  • fontadoni


    Now that I converted my board from phpbb to bbpress I need to know how to redirect the old stuff to where the new board is (so people coming from google can at least get to the new bbPress index and not just get a 401 – which is what is currently happening). I suppose I need to do this in my htaccess file. Does anyone have the code for this? Thanks.

Viewing 8 replies - 1 through 8 (of 8 total)
  • You mean to just redirect one folder to another?

    Pretend your old forum was at and the new one is at

    Delete the phpbb2 folder and in your .htaccess add this:

    RewriteRule ^phpbb2(.*)$ [L,R=301]

    That will make what’s called a Permanent redirect, and in theory teach site crawlers what’s up. Mind, a 401 is for unauthorized access, which is an odd error to get.



    Hello Ipstenu, thanks for your response. Sorry, I should have mentioned that the new bbpress board is actually on the same folder as the previous phpbb one (/forum), however, I get people coming from google trying to find phpbb pages like:


    ,but the new pages now look more like: forum/topic.php?id=38 on bbpress.

    I was wondering if there’s a code I can add so people coming from google at least can be redirected to the forum’s index, right now they’re getting a 404 (sorry, I said 401 previously) because the old page can’t be found.

    At least until google indexes everything again.




    You would need to map all the old phpBB URLs to new bbPress URLs, one to one, since it doesn’t look like there’s an easy way to create a rewrite rule. Once you have all the URLs before and after, you can create 301 redirect rules in your .htaccess file.

    At a guess…

    RewriteRule ^forum/faq(.*)$ [L,R=301]
    RewriteRule ^forum/mcp(.*)$ [L,R=301]
    RewriteRule ^forum/member(.*)$ [L,R=301]
    RewriteRule ^forum/search(.*)$ [L,R=301]
    RewriteRule ^forum/ucp(.*)$ [L,R=301]
    RewriteRule ^forum/view(.*)$ [L,R=301]

    That’s the majority of the links, I think. At least the ones off the main page of a forum.



    Thanks Chris and Ipstenu for your reply. I will give it a try and report back!



    What would the RewriteCond be in this case?



    Any clue on what the RewriteCond code for this would be? I’ve been trying to look this up but haven’t found anything yet.



    You shouldn’t need a RewriteCond in that case, the RewriteRule can work without it if it’s simple enough.

    If you are using the .htaccess inside of the /forum/ directory though, the above examples need to be trimmed without the forum/ part.


    RewriteRule ^forum/faq

    should actually be

    RewriteRule ^faq

    Only leave the forum/ part in there if you are using the .htaccess in the parent (webroot) folder.

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.
Skip to toolbar