diff --git a/r2/r2/controllers/front.py b/r2/r2/controllers/front.py index a260f7925..2f1ca53f4 100644 --- a/r2/r2/controllers/front.py +++ b/r2/r2/controllers/front.py @@ -68,8 +68,8 @@ class FrontController(RedditController): new_url = new_url + query_string(request.get) - # redirect should be smarter and handle extentions, etc. - return self.redirect(new_url) + # redirect should be smarter and handle extensions, etc. + return self.redirect(new_url, code=301) def GET_random(self): """The Serendipity button""" diff --git a/r2/r2/controllers/validator/validator.py b/r2/r2/controllers/validator/validator.py index 0e7cf5cc2..452164d7f 100644 --- a/r2/r2/controllers/validator/validator.py +++ b/r2/r2/controllers/validator/validator.py @@ -620,6 +620,10 @@ class VReason(Validator): fullname = reason[5:] t = Thing._by_fullname(fullname) return ('redirect', t.permalink) + elif reason.startswith('share_'): + fullname = reason[6:] + t = Thing._by_fullname(fullname) + return ('redirect', t.permalink) elif reason.startswith('reply_'): fullname = reason[6:] t = Thing._by_fullname(fullname) diff --git a/r2/r2/templates/link.html b/r2/r2/templates/link.html index 3a822453c..430414325 100644 --- a/r2/r2/templates/link.html +++ b/r2/r2/templates/link.html @@ -151,6 +151,9 @@ title = "comments on " + thing.title, newwindow = c.user.pref_newwindow)} +