Skip to content

Commit 9c73e5d

Browse files
committed
GitLab pages + examples
1 parent d943713 commit 9c73e5d

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

docs/dev/design/redirects.rst

+26
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,21 @@ How other services implement redirects
118118
- Match by country/language and cookies
119119
- Per-domain and protocol redirects
120120
- In case of multiple matches, the topmost redirect will be used.
121+
- Rewrites, serve a different file without redirecting.
121122

122123
https://docs.netlify.com/routing/redirects/
123124

125+
- GitLab pages supports the same syntax as Netlify,
126+
and supports a subset of their features:
127+
128+
- ``_redirects`` config file
129+
- Status codes
130+
- Rewrites
131+
- Wildcards (splats)
132+
- Placeholders
133+
134+
https://docs.gitlab.com/ee/user/project/pages/redirects.html
135+
124136
Improvements
125137
------------
126138

@@ -214,6 +226,13 @@ Improving page redirects
214226
but it will be useful to simplify the explanation of the feature
215227
(one less restriction to explain).
216228

229+
Example:
230+
231+
From:
232+
``/security/``
233+
To:
234+
``https://example.com/security/``
235+
217236
- Allow a wildcard at the end of the from path.
218237
This will allow users to migrate a whole directory to a new path
219238
without having to create an exact redirect for each version.
@@ -222,6 +241,13 @@ Improving page redirects
222241
This means that that page redirects are the same as exact redirects,
223242
with the only difference that they apply to all versions.
224243

244+
Example:
245+
246+
From:
247+
``/old/path/$rest``
248+
To:
249+
``/new/path/$rest``
250+
225251
Improving Sphinx redirects
226252
~~~~~~~~~~~~~~~~~~~~~~~~~~
227253

0 commit comments

Comments
 (0)