Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Is there a way to do 301 redirects?

By
Bruce Letterle
on 2/18/15, 5:34 PM 892 views

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.

0
Jordan Vrtanoski
On 2/20/15, 10:14 AM

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.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 2/18/15, 5:34 PM
Seen: 892 times
Last updated: 3/16/15, 8:10 AM