Romain Derie
82763183d2
[FIX] website: redirect to case insensitive URL if not exact match
...
Before this commit, if a link to a page was not correct because of a
case mismatch, it would simply land on a 404 page.
While it's correct, as URL are case sensitive, it leads to a few bad UX
flow at the admin/editor level:
- Create a link in your page (on a text or a button eg), type an URL
which does not exists (to create it after) like /Page
- Click on the link/button you just made, you are redirected to /Page
which display a 404 with the "Create page" option (correct)
- When you click on that button, it will actually create a page with
/page URL, leading to a mismatch between the URL you created and the
page URL.
Your link/button will still lead to a 404 URL as it points to /Page.
Since it's just a fallback when an exact URL match is not found, it
should not break anything and should not have bad impact at any level
(seo/speed etc).
Indeed:
- It's done through a 302 redirect
- `_serve_page()` is already a fallback case, so it will only make
the `website.redirect` and 404 cases a bit slower due to the extra
search query.
The only possible scenario seems to be if the user (mind the uppercase):
- Created a /Page page
- Created a redirect from /page to /another-page
In this case, /page won't land on /another-page but on /Page.
This flow seems unlikely and is not actually wrong either way.
At least, it certainly is less important than ensuring a case
insensitive fallback.
Finally, note that another solution would have been to either:
- Force page URL to lower case.
-> This is not stable friendly, people might be relying on this to
create pages with different casing:
`/Batman-VII-The-Dark-Knight-Whatevers`, while not recommended,
doesn't sounds idiot.
On top of not being stable friendly, we probably want to keep
offering this possibility
- Redirect all URLs to lowercase endpoints.
-> This is obviously not stable and not Odoo's jobs. It should be
something decided by the sysadmin and done at nginx (etc) level.
task-3110294
opw-3104030
closes odoo/odoo#111736
X-original-commit: f05491105f93939490cbeb078cb7653c38685644
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com >
2023-02-03 06:06:20 +01:00
..
2023-02-03 06:06:01 +01:00
2023-02-01 10:25:01 +01:00
2023-01-27 17:29:16 +01:00
2023-01-31 16:25:03 +01:00
2023-02-01 10:25:01 +01:00
2023-01-31 16:25:03 +01:00
2023-02-01 10:25:01 +01:00
2023-01-26 19:56:07 +01:00
2022-12-13 11:47:49 +01:00
2022-11-23 21:56:09 +01:00
2023-01-31 12:56:24 +01:00
2022-12-26 11:39:44 +01:00
2023-01-17 01:10:09 +01:00
2022-12-02 14:40:25 +01:00
2023-01-16 19:45:57 +01:00
2023-01-27 23:17:35 +01:00
2023-01-27 23:17:35 +01:00
2023-01-24 10:20:30 +01:00
2023-01-27 23:17:35 +01:00
2023-02-01 10:25:01 +01:00
2023-01-24 10:20:30 +01:00
2022-12-16 16:17:41 +01:00
2023-01-25 16:36:53 +01:00
2023-01-16 19:45:52 +01:00
2023-01-24 10:20:30 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-01-27 21:10:16 +01:00
2023-01-30 22:27:14 +01:00
2023-01-19 09:13:17 +01:00
2023-02-02 18:46:02 +01:00
2023-02-02 15:02:04 +01:00
2023-01-24 10:20:30 +01:00
2023-01-27 23:17:35 +01:00
2023-01-27 23:17:35 +01:00
2023-02-01 10:25:01 +01:00
2023-01-27 23:17:35 +01:00
2023-01-09 16:39:15 +01:00
2023-01-27 19:56:03 +01:00
2023-01-24 10:20:38 +01:00
2023-01-17 18:12:48 +01:00
2023-01-31 15:17:55 +01:00
2023-01-24 10:20:30 +01:00
2023-02-03 05:09:06 +01:00
2023-02-03 05:09:06 +01:00
2023-01-24 10:20:30 +01:00
2023-01-31 12:56:22 +01:00
2022-12-16 16:17:41 +01:00
2023-01-31 16:24:45 +01:00
2023-01-11 22:43:14 +01:00
2023-02-01 10:25:01 +01:00
2023-01-24 10:20:30 +01:00
2023-01-26 10:16:53 +01:00
2023-02-03 06:06:01 +01:00
2022-12-12 18:16:17 +01:00
2022-12-06 10:52:26 +01:00
2023-01-31 18:37:28 +01:00
2023-01-27 08:17:52 +01:00
2023-01-24 10:20:30 +01:00
2023-01-31 12:56:14 +01:00
2023-02-01 10:25:01 +01:00
2023-01-27 23:17:35 +01:00
2022-12-16 16:17:41 +01:00
2023-01-27 19:56:08 +01:00
2023-01-27 23:17:35 +01:00
2023-01-24 10:20:30 +01:00
2023-01-24 10:20:30 +01:00
2023-02-01 10:25:01 +01:00
2023-01-24 10:20:30 +01:00
2023-01-25 17:50:14 +01:00
2023-01-26 10:16:53 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2022-12-27 11:17:41 +01:00
2023-01-31 12:55:49 +01:00
2023-01-17 18:12:48 +01:00
2022-12-02 14:40:25 +01:00
2022-12-14 14:19:58 +01:00
2023-01-27 23:17:35 +01:00
2023-01-18 17:38:01 +01:00
2023-01-17 19:55:50 +01:00
2023-01-31 16:24:40 +01:00
2023-01-17 19:55:50 +01:00
2023-01-17 19:55:50 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-01-17 19:55:50 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 14:38:18 +01:00
2023-02-01 12:27:48 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-01-23 16:01:27 +01:00
2023-02-01 10:25:01 +01:00
2023-01-17 19:55:50 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-01-18 13:25:32 +01:00
2023-01-18 13:25:32 +01:00
2023-01-24 16:18:23 +01:00
2023-01-27 14:03:35 +01:00
2023-01-18 13:25:32 +01:00
2023-02-01 10:25:01 +01:00
2023-01-17 19:55:50 +01:00
2023-01-03 13:16:05 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-01-31 12:56:27 +01:00
2023-01-30 09:39:40 +01:00
2023-02-01 10:25:01 +01:00
2023-01-17 19:55:50 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-01-26 14:19:00 +01:00
2023-02-01 14:38:28 +01:00
2023-01-10 15:43:16 +01:00
2023-01-24 16:18:18 +01:00
2023-02-01 14:37:50 +01:00
2023-02-01 10:25:01 +01:00
2023-01-17 19:55:50 +01:00
2023-01-30 19:45:56 +01:00
2022-12-16 16:17:41 +01:00
2023-01-30 15:35:25 +01:00
2023-02-01 10:25:01 +01:00
2023-01-17 19:55:50 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-01-27 23:17:50 +01:00
2023-01-17 19:55:50 +01:00
2023-02-03 05:09:28 +01:00
2023-01-31 12:55:58 +01:00
2023-01-31 14:04:10 +01:00
2023-01-23 16:01:27 +01:00
2023-01-02 09:53:57 +01:00
2023-01-02 09:53:57 +01:00
2023-01-02 09:53:57 +01:00
2023-01-02 09:53:57 +01:00
2023-02-01 10:25:01 +01:00
2023-01-16 10:32:18 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-01-17 19:55:50 +01:00
2023-01-17 19:55:50 +01:00
2023-02-01 13:30:46 +01:00
2023-02-01 10:25:01 +01:00
2022-11-23 16:14:45 +01:00
2023-02-01 10:25:01 +01:00
2022-12-16 16:17:41 +01:00
2023-01-29 03:41:52 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-01-17 19:55:50 +01:00
2022-12-09 19:45:52 +01:00
2023-02-01 10:25:01 +01:00
2022-11-29 13:20:31 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-01-17 19:55:50 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2022-12-16 12:45:40 +01:00
2023-02-01 10:25:01 +01:00
2023-01-17 19:55:50 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 14:37:50 +01:00
2023-01-17 19:55:50 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-01-17 19:55:50 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-01-17 19:55:50 +01:00
2023-01-20 06:21:02 +01:00
2023-02-03 05:09:14 +01:00
2023-01-27 23:17:35 +01:00
2023-02-03 05:08:51 +01:00
2023-01-27 19:56:03 +01:00
2023-01-17 20:58:34 +01:00
2023-01-24 10:20:30 +01:00
2023-01-27 23:17:35 +01:00
2023-01-26 22:09:53 +01:00
2023-01-26 22:09:53 +01:00
2022-12-22 15:55:07 +01:00
2023-01-03 13:16:02 +01:00
2022-12-01 16:27:52 +01:00
2023-02-03 01:13:39 +01:00
2023-01-09 22:31:51 +01:00
2023-02-02 15:02:13 +01:00
2023-01-26 17:33:49 +01:00
2023-01-11 13:20:48 +01:00
2023-02-01 10:25:01 +01:00
2023-01-24 10:20:30 +01:00
2022-12-01 17:32:22 +01:00
2023-01-10 18:54:47 +01:00
2023-01-06 08:09:07 +01:00
2023-01-30 22:27:15 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-01 10:25:01 +01:00
2023-01-24 10:20:30 +01:00
2023-02-03 05:09:38 +01:00
2023-01-30 19:45:59 +01:00
2023-01-23 16:01:27 +01:00
2023-01-23 16:01:27 +01:00
2023-01-25 08:18:01 +01:00
2023-01-23 16:01:27 +01:00
2023-02-01 16:39:51 +01:00
2023-02-01 14:38:03 +01:00
2023-02-02 21:25:09 +01:00
2023-01-25 16:37:10 +01:00
2023-02-01 17:49:13 +01:00
2023-01-25 16:37:10 +01:00
2023-01-23 16:01:27 +01:00
2023-01-30 17:54:34 +01:00
2023-01-23 16:01:27 +01:00
2023-01-19 18:49:53 +01:00
2023-01-23 16:01:27 +01:00
2023-01-23 16:01:27 +01:00
2023-01-24 10:20:30 +01:00
2022-12-01 16:27:58 +01:00
2023-02-03 05:08:43 +01:00
2023-01-17 20:58:34 +01:00
2023-01-06 18:41:46 +01:00
2023-02-01 10:25:01 +01:00
2023-01-04 11:35:49 +01:00
2023-01-24 10:20:30 +01:00
2023-02-03 05:08:51 +01:00
2022-12-19 11:33:49 +01:00
2023-02-01 10:25:01 +01:00
2023-02-03 06:06:12 +01:00
2023-01-31 15:17:52 +01:00
2023-01-24 10:20:30 +01:00
2023-01-27 23:17:35 +01:00
2023-01-24 13:47:26 +01:00
2023-01-13 16:27:26 +01:00
2023-01-13 16:27:26 +01:00
2023-02-01 10:25:01 +01:00
2023-01-27 19:56:09 +01:00
2023-01-24 10:20:30 +01:00
2023-01-26 10:16:53 +01:00
2023-02-03 06:05:53 +01:00
2023-02-01 10:25:01 +01:00
2023-02-03 05:09:05 +01:00
2023-02-03 05:09:05 +01:00
2023-01-24 09:12:01 +01:00
2023-02-01 10:25:01 +01:00
2023-02-03 05:09:05 +01:00
2023-01-26 12:19:09 +01:00
2023-01-18 21:08:52 +01:00
2022-11-25 17:55:59 +01:00
2023-01-25 08:18:01 +01:00
2023-01-30 16:45:40 +01:00
2023-01-13 16:27:26 +01:00
2023-02-01 10:25:01 +01:00
2023-01-16 15:43:00 +01:00
2023-01-26 12:19:17 +01:00
2023-02-03 05:09:05 +01:00
2023-02-01 10:25:01 +01:00
2023-02-03 05:09:05 +01:00
2023-01-10 18:54:47 +01:00
2023-02-01 10:25:01 +01:00
2023-01-24 10:20:30 +01:00
2022-12-02 14:40:25 +01:00
2023-02-01 16:39:54 +01:00
2023-01-17 20:59:02 +01:00
2023-01-24 10:20:30 +01:00
2023-01-24 10:20:30 +01:00
2023-01-24 10:20:30 +01:00
2023-01-24 10:20:30 +01:00
2023-01-13 16:27:17 +01:00
2023-01-24 10:20:30 +01:00
2023-01-26 19:56:04 +01:00
2023-01-24 10:20:30 +01:00
2023-01-24 10:20:30 +01:00
2023-01-26 19:56:05 +01:00
2023-01-24 10:20:30 +01:00
2023-01-24 10:20:30 +01:00
2023-01-26 19:56:04 +01:00
2023-02-03 06:05:48 +01:00
2023-02-01 19:37:51 +01:00
2023-01-24 10:20:30 +01:00
2022-12-23 12:10:58 +01:00
2023-02-03 06:06:10 +01:00
2023-02-01 10:25:01 +01:00
2023-02-03 06:05:56 +01:00
2023-01-13 16:27:38 +01:00
2022-11-21 22:20:27 +01:00
2022-11-21 22:20:27 +01:00
2023-01-27 23:17:35 +01:00
2023-01-27 19:56:09 +01:00
2023-01-27 19:56:08 +01:00
2023-01-25 09:16:47 +01:00
2023-01-27 19:56:08 +01:00
2022-12-09 16:40:58 +01:00
2023-01-27 23:17:35 +01:00
2023-02-01 10:25:01 +01:00
2023-01-27 23:17:35 +01:00
2023-01-27 23:17:35 +01:00
2023-02-03 06:05:51 +01:00
2023-01-20 06:21:02 +01:00
2023-02-03 06:06:15 +01:00
2023-02-01 19:37:48 +01:00
2023-01-27 23:17:35 +01:00
2023-01-24 10:20:30 +01:00
2023-02-03 06:06:20 +01:00
2023-01-27 19:56:03 +01:00
2023-01-27 23:17:35 +01:00
2023-01-17 20:58:34 +01:00
2023-01-24 10:20:30 +01:00
2023-02-03 05:09:11 +01:00
2023-01-27 23:17:35 +01:00
2023-01-27 23:17:35 +01:00
2023-01-24 10:20:30 +01:00
2022-12-02 14:40:25 +01:00
2023-01-24 10:20:30 +01:00
2023-01-16 19:45:57 +01:00
2023-01-27 23:17:35 +01:00
2023-01-27 23:17:35 +01:00
2023-01-17 20:58:41 +01:00
2023-01-16 19:45:57 +01:00
2023-01-24 21:10:52 +01:00
2023-01-31 15:18:01 +01:00
2022-12-06 10:52:50 +01:00
2023-01-27 23:17:35 +01:00
2023-01-27 23:17:35 +01:00
2023-01-27 23:17:35 +01:00
2022-11-24 19:25:14 +01:00
2022-11-24 19:25:14 +01:00
2023-01-31 15:17:58 +01:00
2022-12-01 16:27:52 +01:00
2023-01-24 10:20:30 +01:00
2022-12-02 14:40:25 +01:00
2022-12-02 14:40:25 +01:00
2023-02-03 05:09:11 +01:00
2023-01-27 23:17:35 +01:00
2023-01-27 23:17:35 +01:00
2023-01-27 23:17:35 +01:00
2022-12-02 14:40:25 +01:00
2023-01-16 19:45:57 +01:00
2023-01-27 23:17:35 +01:00
2023-01-27 23:17:35 +01:00
2023-01-27 23:17:35 +01:00
2023-01-27 23:17:35 +01:00
2023-01-18 21:08:52 +01:00
2023-01-27 23:17:35 +01:00
2023-01-27 23:17:35 +01:00
2023-01-27 23:17:35 +01:00
2023-01-31 14:04:30 +01:00
2023-01-17 18:12:48 +01:00
2023-01-16 19:45:57 +01:00
2023-01-24 10:20:30 +01:00