Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Permalinks Slugs Modification – removing forum

Hi bobby, I tried out your hack in bbPress 0.9, and it doesn’t seem to work. Here’s what I did:

I have my bbPress directory installed in a directory called “forums” in the root web directory. So the URL to access the forums’ home page is:

http://www.example.com/forums

and accessing a forum titled “test forum” is at this URL:

http://www.example.com/forums/forum/test-forum

a topic titled “test topic” is at this URL:

http://www.example.com/forums/topic/test-forum

I implemented your hack, and changed “forum” to “board” in the template-functions.php. I copied the rewrite rules from rewrite-rules.php and placed them into .htaccess file in the root web directory. I also added the two lines of code you suggested in that file:

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

I also tried adding this to the rewrite-rules.php:

RewriteRule ^board/([^/]+)/page/([0-9]+)/?$ <?php bb_option( 'path' ); ?>topic.php?id=$1&page=$2 [L,QSA]
RewriteRule ^board/([^/]+)/?$ <?php bb_option( 'path' ); ?>topic.php?id=$1 [L,QSA]

When I go to this URL:

http://www.example.com/board/test-forum

I get a 404 error.

However, when I go to this url:

http://www.example.com/forums/forum/test-forum/

It redirects and changes the URL in the address bar in the browser window changes:

http://www.example.com/forums/board/test-forum/

That also brings up a 404 page.

Also, when I go this URL:

http://www.example.com/topic/test-topic

The URL works, but it redirects and changes the URL in the address bar in the browser window changes to:

http://www.example.com/forums/topic/test-forum

I am a little perplexed as to what is going on.

Skip to toolbar