Info
- 3 posts
- 2 voices
- Started 4 years ago by _ck_
- Latest reply from _ck_
- This topic is not resolved
permalinks with trailing slash
-
- Posted 4 years ago #
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 4 years ago #
You should ticket this in Trac, we should probably deal with this case better than we do.
-
- Posted 4 years ago #
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
-
You must log in to post.