Info
- 9 posts
- 5 voices
- Started 1 year ago by crobinson18
- Latest reply from extremejacob
- This topic is not resolved
Moved forum to Subdomain - frontpage loads but forum doesn't work now
-
- Posted 1 year ago #
I moved my forum from http://www.nissenfundoplication.com to http://www.nissenfundoplication.com/forum
The frontpage loads fine but clicking on any forum or topic link results in an error.
Please help!
bbpress 1.0.2
Chris
-
- Posted 1 year ago #
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 .htaccessIs there any more to it than that?
-
- Posted 1 year ago #
The annoying part is that despite the
RewriteBasedirective 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.
-
- Posted 1 year ago #
Blanking
.htaccessand re-setting permalinks is quicker and less error-prone, imho. -
- Posted 1 year ago #
Good point mr_pelle.
-
- Posted 1 year ago #
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/$1Solved!
-
- Posted 1 year ago #
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.
[I'm not sure why it worked initially. Maybe my browser loaded a .htaccess file which then doesn't work anymore.]
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?
-
- Posted 1 year ago #
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".
-
You must log in to post.