QUESTION:
I have a WordPress install and I’ve just integrated bbPress, which is installed into a ‘/forum/’ directory. When I visit ‘/forum/’ the bbPress page opens fine, but when I open a thread
(/forum/topic/your-first-topic) I see a WordPress 404 error page.
How can I make WordPress ignore that ‘/forum’/ directory entirely?
ANSWER: You sould be able to modify the .htaccess
insert the following line before the 2 other rewrite conds:
RewriteCond %{REQUEST_URI} !^/forum
You will likely want to create this code above the comments that indicate wordpress created code. WordPress will overwrite everything between the comments it posts.
ANOTHER OPTION:
Since your using bbPress with Pretty Permalinks, I think your best bet is
to add a .htaccess to the bbpress /forum/ folder.
That .htaccess should override the wordpress .htaccess a folder down:
So in /.htaccess:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
and then in /forum/.htaccess
# BEGIN bbPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /forum/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /forum/index.php [L]
</IfModule>
# END bbPress
(Or whatever the bbPress recomended .htaccess is.
© Copyright 2023 Sethmatics Websites All Rights Reserved.