bbPress

Simple, Fast, Elegant

bbPress support forums » Troubleshooting

permalinks with trailing slash

(3 posts)
  • Started 11 months ago by _ck_
  • Latest reply from _ck_
  • This topic is not resolved

Tags:

  1. I can't use multiviews so any rewrite gurus know how to make the full rewrite rules set deal with trailing backslashes?

    I'd like to allow it work either way (with or without the final slash)

    Posted 11 months ago #
  2. You should ticket this in Trac, we should probably deal with this case better than we do.

    Posted 11 months ago #
  3. If it makes you feel any better, wordpress doesn't deal with it well either.

    I have to trick it into enforcing trailing slashes like this:

    RewriteCond %{REQUEST_FILENAME} !-f
    # RewriteCond %{REQUEST_URI} !..+$
    RewriteCond %{REQUEST_URI} !/$
    RewriteRule (.*) $1/ [R=301,L,QSA]

    and that doesn't even work half the time depending on what other htaccess trickery I've got going on

    But I notice if I have slugs turned on in bbpress, it will remove the trailing slash always. If I have slugs turned off, it won't tolerate a trailing slash at all and will 404

    I did manage to get the topmost rss feed to tolerate slash or not using this obvious mod

    RewriteRule ^rss(/|)$ /forums/rss.php [L,QSA]

    One thing that is important to do in bbpress vs how it's typically done in wordpress, is not re-use/re-load the bbpress core engine if there is a redirect (which doubles the mysql calls) but to try to do it through htaccess

    Posted 11 months ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.