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.

2

What is a good way to handle 301 redirects on the web and e-commerce side?

By
Kasper Souren
on 8/18/14, 10:32 AM 1,728 views

mod_rewrite and .htaccess are only available when hosting through Apache, but that is not a requirement. What is a good way to handle 301 redirects?

Is there a module that handles 301 redirects? Such as Drupal's Redirect module or WordPress's Redirection extension.

Otherwise, what is a good way to get an Odoo module started? Should I look at werkzeug routing?

0
OpenGest.Solutions
On 6/4/16, 3:31 AM

  You can also do it with jQuery: http://www.opengest.solutions/forum/aide-1/question/odoo-comment-faire-une-redirection-de-page-301-ou-302-12  

0
Dieter Huelskamp
On 4/16/15, 11:39 PM

Is there any .htaccess one could write rules not to loose all old urls?

0
Jean-Charles Drubay
On 11/8/14, 9:49 PM

I am rewritting routes manually in the controller. But I wish I knew a better way.

    @http.route('/my-old-path-to-event/<path:oldpage>', type='http', auth="public", website=True)
    def redirect_to_event(self, oldpage):
        return werkzeug.utils.redirect("/event", 301)

What I would do if I had more time would be to add a field "oldpage_key" on the event model. Then in my controller, search if I kind find my oldpage withing my events.

I think that in order to write a module, you would need to allow configuration through the UI of the controllers.

0
Marek Mosiewicz
On 9/16/14, 10:08 AM

werkzung RequestRedirect probably.

I love upvoting and accepting answers here but a 3 word answer is a bit too thin for that :)

Kasper Souren
on 9/16/14, 1:17 PM

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

2 follower(s)

Stats

Asked: 8/18/14, 10:32 AM
Seen: 1728 times
Last updated: 6/4/16, 3:31 AM