跳至内容
菜单
此问题已终结
1 回复
6490 查看

I am using Odoo v8 website builder on an Ubuntu 14.04 clean install. I need to be able to redirect website page links and do not see any way to do it with a .htaccess file or anything within Odoo website builder to change web page URLs. Does anyone know of another approach to solving this? It is important for SEO to be able to name or redirect pages from another website once it is moved to an Odoo installation.

形象
丢弃
最佳答案

You would need to create new controller that will return a redirection. To create a controller, you need to create class that inherits http.Controller and your redirection method should be decorated with @http.route

    @http.route(['/mypage'], type='http', auth="public", website=True)
    def redirect(self):
        return werkzeug.utils.redirect("/myNewPage",301)

You can see the blog module from odoo v8 for more examples on the use of redirection.

形象
丢弃
相关帖文 回复 查看 活动
1
3月 15
11949
4
7月 16
2191
13
11月 15
16531
1
9月 15
4909
2
3月 15
9063