mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 04:25:55 +01:00
fix: #8549 send 308 Permanent Redirect on topic/category shortlinks
This commit is contained in:
@@ -44,7 +44,7 @@ topicsController.get = async function getTopic(req, res, callback) {
|
||||
}
|
||||
|
||||
if (!res.locals.isAPI && (!req.params.slug || topicData.slug !== tid + '/' + req.params.slug) && (topicData.slug && topicData.slug !== tid + '/')) {
|
||||
return helpers.redirect(res, '/topic/' + topicData.slug + (postIndex ? '/' + postIndex : '') + (currentPage > 1 ? '?page=' + currentPage : ''));
|
||||
return helpers.redirect(res, '/topic/' + topicData.slug + (postIndex ? '/' + postIndex : '') + (currentPage > 1 ? '?page=' + currentPage : ''), true);
|
||||
}
|
||||
|
||||
if (postIndex === 'unread') {
|
||||
|
||||
Reference in New Issue
Block a user