[FIX] website_blog:redirection 301 instead of 302 to new blog
-Create a second blog -Move one post to this second blog -Access the post with the url from the first blog Before this commit: You will get redirected to the new url with a code 302 (temporary). After this commit: You will get redirected to the new url with the code to 301 (permanent). OPW-2059194 closes odoo/odoo#36161 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit is contained in:
@@ -230,7 +230,7 @@ class WebsiteBlog(http.Controller):
|
||||
blog_url = QueryURL('', ['blog', 'tag'], blog=blog_post.blog_id, tag=tag, date_begin=date_begin, date_end=date_end)
|
||||
|
||||
if not blog_post.blog_id.id == blog.id:
|
||||
return request.redirect("/blog/%s/post/%s" % (slug(blog_post.blog_id), slug(blog_post)))
|
||||
return request.redirect("/blog/%s/post/%s" % (slug(blog_post.blog_id), slug(blog_post)), code=301)
|
||||
|
||||
tags = request.env['blog.tag'].search([])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user