[wp-hackers] Make WP permalinks ignore a directory?
DD32
wordpress at dd32.id.au
Fri Apr 4 22:52:29 GMT 2008
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.
The result is that the web server should spot the .htaccess in the /forum/
folder and use that instead of using the next folder it checks.
(ie. If its looking in /forum/site/something/ it looks for
/forum/site/something/.htaccess, then /forum/site/.htaccess, then
/forum/.htaccess, then /.htaccess)
That should work..
D
On Sat, 05 Apr 2008 09:37:22 +1100, Alex Hempton-Smith
<hempsworth at googlemail.com> wrote:
> Thanks for the replies everyone, but I can't seem to get it working!
>
> I've tried the following setups as recommended:
>
> RewriteRule ^forum/.* - [L]
> # BEGIN WordPress
> <IfModule mod_rewrite.c>
> RewriteEngine On
> RewriteBase /
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule . /index.php [L]
> </IfModule>
> # END WordPress
>
> # BEGIN WordPress
> <IfModule mod_rewrite.c>
> RewriteEngine On
> RewriteBase /
> RewriteRule ^forum/.* - [L]
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule . /index.php [L]
> </IfModule>
> # END WordPress
>
> # BEGIN WordPress
> <IfModule mod_rewrite.c>
> RewriteEngine On
> RewriteBase /
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteCond %{REQUEST_URI} !^/forum
> RewriteRule . /index.php [L]
> </IfModule>
> # END WordPress
>
> None of them do the trick. It's strange, becuase it works fine when I
> visit
> the root bbPress directory '/forum/', it's everything after that in the
> URL
> that doesn't work.
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
More information about the wp-hackers
mailing list