Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Rewriting up one level


Sam Bauers
Participant

@sambauers

Add this to your sites root directory .htaccess file.

This assumes that your bbPress install is in a subdirectory of your sites root called “forums”.

These rules need to be added before any WordPress rules.

The rewrite will work, but bb_repermalink() will change the URL so that it appears as it normally would.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^users/([^/]+)/page/([0-9]+)/?$ /forums/profile.php?id=$1&page=$2 [L,QSA]
RewriteRule ^users/([^/]+)/([^/]+)/?$ /forums/profile.php?id=$1&tab=$2 [L,QSA]
RewriteRule ^users/([^/]+)/([^/]+)/page/([0-9]+)/?$ /forums/profile.php?id=$1&tab=$2&page=$3 [L,QSA]
RewriteRule ^users/([^/]+)/?$ /forums/profile.php?id=$1 [L,QSA]
</IfModule>

Skip to toolbar