From 9c73e5dfe4499e607136c319ec8a75a1583d7b1a Mon Sep 17 00:00:00 2001 From: Santos Gallegos Date: Thu, 26 Oct 2023 13:02:10 -0500 Subject: [PATCH] GitLab pages + examples --- docs/dev/design/redirects.rst | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/docs/dev/design/redirects.rst b/docs/dev/design/redirects.rst index 355cc6fa295..87a9f4726cf 100644 --- a/docs/dev/design/redirects.rst +++ b/docs/dev/design/redirects.rst @@ -118,9 +118,21 @@ How other services implement redirects - Match by country/language and cookies - Per-domain and protocol redirects - In case of multiple matches, the topmost redirect will be used. + - Rewrites, serve a different file without redirecting. https://docs.netlify.com/routing/redirects/ +- GitLab pages supports the same syntax as Netlify, + and supports a subset of their features: + + - ``_redirects`` config file + - Status codes + - Rewrites + - Wildcards (splats) + - Placeholders + + https://docs.gitlab.com/ee/user/project/pages/redirects.html + Improvements ------------ @@ -214,6 +226,13 @@ Improving page redirects but it will be useful to simplify the explanation of the feature (one less restriction to explain). + Example: + + From: + ``/security/`` + To: + ``https://example.com/security/`` + - Allow a wildcard at the end of the from path. This will allow users to migrate a whole directory to a new path without having to create an exact redirect for each version. @@ -222,6 +241,13 @@ Improving page redirects This means that that page redirects are the same as exact redirects, with the only difference that they apply to all versions. + Example: + + From: + ``/old/path/$rest`` + To: + ``/new/path/$rest`` + Improving Sphinx redirects ~~~~~~~~~~~~~~~~~~~~~~~~~~