Skip to:
Content
Pages
Categories
Search
Top
Bottom

Moved forum to Subdomain – frontpage loads but forum doesn't work now

Viewing 8 replies - 1 through 8 (of 8 total)

  • zaerl
    Participant

    @zaerl


    chrishajer
    Participant

    @chrishajer

    So basically, the order should be:

    1. Change the location of the forum in bb-admin

    2. Immediately rename the directory

    3. Modify rewrite rules in .htaccess

    Is there any more to it than that?


    zaerl
    Participant

    @zaerl

    The annoying part is that despite the RewriteBase directive all rewrite rules in .htaccess are in the form:

    RewriteRule ^the-page/(something)/?$ /forum/index.php?the-page=$1 [L,QSA]

    so you need to change all the rules. Or you can switch to numeric mode and then switch back to name-based permalink mode and maybe bbPress will auto-fix it for you.


    mr_pelle
    Participant

    @mr_pelle

    Blanking .htaccess and re-setting permalinks is quicker and less error-prone, imho.


    chrishajer
    Participant

    @chrishajer

    Good point mr_pelle.


    extremejacob
    Member

    @extremejacob

    Here’s what worked for me.

    I changed from website.com/forum/ to forum.website.com/

    I had name-based permalinks. My forum was in public_html/forum

    1) Set up the subdomain (used cpanel with host; this uses the same dir as before)

    2) Switch name-based permalinks to none (very important! You can do this temporarily. Nothing bad happened to me.)

    3) Change the URL from website.com/forum/ to forum.website.com/ in general settings.

    4) I had to log back in again after this step.

    5) Go to admin. I couldn’t get to admin after logging in. The link was pointing me to forum.website.com/forum/bb-admin … I manually typed in

    forum.website.com/bb-admin .. that worked.

    6) Change back to name-based permalinks.

    7) The admin link magically works now.

    8) Go into .htaccess and insert things like

    RedirectMatch 301 /forum/topic/(.*)$ http://forum.website.com/topic/$1

    Solved!


    extremejacob
    Member

    @extremejacob

    Curses! Not completely solved.

    I think my .htaccess is wrong. Currently, it only works with “none”/number based permalinks. When I switch to name-based, I get

    I’m sorry, but there is nothing at this URL,

    when I click on forums and topics.

    Any ideas?

    One dumb question: Is it possible to have two separate .htaccess files? One for the blog in public_html/htaccess and one for the forum in public_html/forum/.htaccess?


    extremejacob
    Member

    @extremejacob

    Okay, figured out that two .htaccess files are okay. This is what I have in public_html/forum/

    # BEGIN bbPress

    Options -MultiViews

    <IfModule mod_rewrite.c>

    RewriteEngine On

    RewriteBase /

    RewriteRule ^page/([0-9]+)/?$ /index.php?page=$1 [L,QSA]

    RewriteRule ^forum/([^/]+)/page/([0-9]+)/?$ /forum.php?id=$1&page=$2 [L,QSA]

    RewriteRule ^forum/([^/]+)/?$ /forum.php?id=$1 [L,QSA]

    RewriteRule ^forum/?$ / [R=302,L,QSA]

    RewriteRule ^topic/([^/]+)/page/([0-9]+)/?$ /topic.php?id=$1&page=$2 [L,QSA]

    etc.

    These rules seem to stay the same regardless of what kind of permalinks I set. Does that make sense?

    As mentioned in the post at the top: The front page works fine. All the links are broken in named-based permalinks, but work fine with “None”.

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