Redirecting old URLs
When you move to the Odoo website from an existing system or website, you must redirect your old URLs to new URLs. With proper redirection, all of your SEO rankings will be moved to new pages. In this recipe, we will see how to redirect old URLs to new URLs in Odoo.
Getting ready
For this recipe, we will be using the my_hostels
module from the previous recipe. For this recipe, we are assuming that you used to have a website and have just moved to Odoo.
How to do it...
Imagine that, in your old website, books were listed at the /my-hostels
URL; as you know, the my_hostel
module lists hostels on the /hostels
URL as well. So, we will now add a redirection rule in Odoo that will redirect your old /my-hostels
URL to the new /hostels
URL. Perform the following steps to add the redirection rule:
- Activate developer mode.
- Open Website | Configuration | Redirects.
- Click on New to add a new rule.
- Enter values in the form, as shown in the following...