[Bb-trac] [bbPress] #982: .htaccess rules should handle empty topic
or forum gracefully
bbPress
bb-trac at lists.bbpress.org
Fri Oct 24 15:53:27 GMT 2008
#982: .htaccess rules should handle empty topic or forum gracefully
----------------------+-----------------------------------------------------
Reporter: _ck_ | Owner:
Type: defect | Status: new
Priority: normal | Milestone: 1.0-beta & XML-RPC
Component: Back-end | Version: 1.0-alpha-2
Severity: normal | Keywords:
----------------------+-----------------------------------------------------
I would like to suggest that the .htaccess generator add these two rules
to handle the accidental blank topic or forum via the path. This can
happen in some weird plugin situations.
{{{
RewriteRule ^topic(|/)$ /forums/ [R=302,L,QSA]
RewriteRule ^forum(|/)$ /forums/ [R=302,L,QSA]
}}}
Where `/forums/` would be their actual forum root of course.
I am not sure if htaccess handles look-ahead, if so it of course can be
written like this instead:
{{{
RewriteRule ^topic\/?$ /forums/ [R=302,L,QSA]
RewriteRule ^forum\/?$ /forums/ [R=302,L,QSA]
}}}
This handles situations like when logging out and you are in a topic or
forum that only logged in users can see. Otherwise they get a nasty 404
message instead.
--
Ticket URL: <http://trac.bbpress.org/ticket/982>
bbPress <http://bbpress.org/>
Innovative forum development
More information about the Bb-trac
mailing list