[bbDev] mod_rewrite

Tom Claessens whistlerke at gmail.com
Sun Jan 29 13:01:22 GMT 2006


Wow. This will certainly help a lot of people!

On 1/29/06, Sean Hayford O'Leary <hayfordoleary at gmail.com> wrote:
>
> Alright, I've finally got it working on my cPanel system. I think this
> should work on most any Apache server with mod_rewrite.
>
> Obviously to anyone who uses it, "/your-install-directory/" should be the
> directory in which bbPress was installed. "/" if it's in the root.
>
> # BEGIN bbPress
> <IfModule mod_rewrite.c>
> RewriteEngine On
> RewriteBase /your-install-directory/
> RewriteRule ^forum/(.+)/page/?([0-9]{1,})/?$ forum.php?id=$1&page=$2
> [QSA,L]
> RewriteRule ^forum/(.+)/?$ forum.php?id=$1 [QSA,L]
> RewriteRule ^profile/(.+)/(edit|favorites)/?$ profile.php?id=$1&tab=$2
> [QSA,L]
> RewriteRule ^profile/(.+)/?$ profile.php?id=$1 [QSA,L]
> RewriteRule ^rss/forum/(.+)/?$ rss.php?forum=$1 [QSA,L]
> RewriteRule ^rss/profile/(.+)/?$ rss.php?profile=$1 [QSA,L]
> RewriteRule ^rss/tags/(.+)/?$ rss.php?tag=$1 [QSA,L]
> RewriteRule ^rss/topic/(.+)/?$ rss.php?topic=$1 [QSA,L]
> RewriteRule ^rss/view/(.+)/?$ rss.php?view=$1 [QSA,L]
> RewriteRule ^rss/?$ rss.php [QSA,L]
> RewriteRule ^search/(.+)/page/?([0-9]{1,})/?$ search.php?q=$1&page=$2
> [QSA,L]
> RewriteRule ^search/(.+)/?$ search.php?q=$1 [QSA,L]
> RewriteRule ^tags/(.+)/page/?([0-9]{1,})/?$ tags.php?tag=$1&page=$2
> [QSA,L]
> RewriteRule ^tags/(.+)/?$ tags.php?tag=$1 [QSA,L]
> RewriteRule ^tags/?$ tags.php [QSA,L]
> RewriteRule ^topic/(.+)/page/?([0-9]{1,})/?$ topic.php?id=$1&page=$2
> [QSA,L]
> RewriteRule ^topic/(.+)/?$ topic.php?id=$1 [QSA,L]
> RewriteRule ^view/(.+)/page/?([0-9]{1,})/?$ view.php?view=$1&page=$2
> [QSA,L]
> RewriteRule ^view/(.+)/?$ view.php?view=$1 [QSA,L]
> </IfModule>
> # END bbPress
>
> On 1/18/06, Sean Hayford O'Leary <hayfordoleary at gmail.com> wrote:
> >
> > Hmm... ain't workin' for me.
> >
> > It's as though the files aren't receiving the data. For example, on a
> > profile page, I get: bb_get_user needs a numeric ID.
> >
> > I tried turning off PHP's safe mode, to no avail. I'm using a
> > cPanel-powered server if that's of any relevance...
> >
> > On 1/18/06, Aaron Crayne <aaron at paintbox.org> wrote:
> > >
> > > I use the following htaccess with my bbpress installs.
> > > Make sure that in bb-config.php you have $bb->mod_rewrite = true;
> > > and this should work fine.
> > >
> > > # BEGIN BBPress
> > > <IfModule mod_rewrite.c>
> > > RewriteEngine On
> > > RewriteBase /directory-where-installed/
> > > Options +MultiViews
> > > </IfModule>
> > > # END BBPress
> > >
> > >
> > >
> > > > I know bbPress uses something other than mod_rewrite... some obscure
> > > > Apache
> > > > function. Anyway, I'm on commerical shared hosting, and do not have
> > > the
> > > > resources to install whatever function it is.
> > > >
> > > > Is there a pre-existing mod_rewrite .htaccess script that would do
> the
> > > > same
> > > > thing? I attempted to make one myself, but, due to my limited
> > > mod_rewrite
> > > > knowledge, ran into problems with profile/edit and
> profile/favorites.
> > > >
> > > > --
> > > > Sean Hayford O'Leary
> > > > http://sdho.hayfordoleary.com
> > > >
> > > > Donate to Oxfam [ http://oxfamamerica.org]. Also, help save Marshall
> > > Fields
> > > > [
> > > > http://keepitfields.org] <http://keepitfields.org%5D>.
> > > > _______________________________________________
> > > > bbDev mailing list
> > > > bbDev at lists.bbpress.org
> > > > http://lists.bbpress.org/mailman/listinfo/bbdev
> > > >
> > >
> > > _______________________________________________
> > > bbDev mailing list
> > > bbDev at lists.bbpress.org
> > > http://lists.bbpress.org/mailman/listinfo/bbdev
> > >
> >
> >
> >
> > --
> > Sean Hayford O'Leary
> > http://sdho.hayfordoleary.com
> >
> > Donate to Oxfam [http://oxfamamerica.org ]. Also, help save Marshall
> > Fields [http://keepitfields.org].
> >
>
>
>
> --
> Sean Hayford O'Leary
> http://sdho.hayfordoleary.com
>
> Donate to Oxfam [http://oxfamamerica.org]. Also, help save Marshall Fields
> [
> http://keepitfields.org].
>
> _______________________________________________
> bbDev mailing list
> bbDev at lists.bbpress.org
> http://lists.bbpress.org/mailman/listinfo/bbdev
>
>
>


More information about the bbDev mailing list