Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2024-01-09 21:07:32 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2024-01-09 21:07:32 +0300
commitcd22685717501ac6f3c81e16418270123a2cccee (patch)
treeeb45b2ea1c3ac174aaa4fd54a38901f1f8420838 /doc/user/project
parent1f753bca2624be1e507424127fe0d48b9765da70 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/user/project')
-rw-r--r--doc/user/project/pages/redirects.md26
-rw-r--r--doc/user/project/repository/branches/index.md2
2 files changed, 27 insertions, 1 deletions
diff --git a/doc/user/project/pages/redirects.md b/doc/user/project/pages/redirects.md
index d13f30060e7..2b33e7dc343 100644
--- a/doc/user/project/pages/redirects.md
+++ b/doc/user/project/pages/redirects.md
@@ -26,7 +26,7 @@ are supported.
| Rewrites (other than `200`) | **{dotted-circle}** No | `/en/* /en/404.html 404` |
| Query parameters | **{dotted-circle}** No | `/store id=:id /blog/:id 301` |
| Force ([shadowing](https://docs.netlify.com/routing/redirects/rewrites-proxies/#shadowing)) | **{dotted-circle}** No | `/app/ /app/index.html 200!` |
-| Domain-level redirects | **{dotted-circle}** No | `http://blog.example.com/* https://www.example.com/blog/:splat 301` |
+| [Domain-level redirects](#domain-level-redirects) | **{check-circle}** Yes | `http://blog.example.com/* https://www.example.com/blog/:splat 301` |
| Redirect by country or language | **{dotted-circle}** No | `/ /anz 302 Country=au,nz` |
| Redirect by role | **{dotted-circle}** No | `/admin/* 200! Role=admin` |
@@ -119,6 +119,30 @@ request matches the `from`:
This status code can be used in combination with [splat rules](#splats) to dynamically
rewrite the URL.
+## Domain-level redirects
+
+> [Introduced](https://gitlab.com/gitlab-org/gitlab-pages/-/merge_requests/936) in GitLab 16.8 [with a flag](../../../administration/feature_flags.md) named `FF_ENABLE_DOMAIN_REDIRECT`. Disabled by default.
+
+To create a domain-level redirect, add a domain-level path (beginning with `http://`
+or `https://`) to either:
+
+- The `to` path only.
+- The `from` and `to` paths.
+The supported [HTTP status codes](#http-status-codes) are `301` and `302`:
+
+```plaintext
+# 301 permanent redirect
+http://blog.example.com/file_1.html https://www.example.com/blog/file_1.html 301
+/file_2.html https://www.example.com/blog/file_2.html 301
+
+# 302 temporary redirect
+http://blog.example.com/file_3.html https://www.example.com/blog/file_3.html 302
+/file_4.html https://www.example.com/blog/file_4.html 302
+```
+
+Domain-level redirects can be used in combination with [splat rules](#splats) (including splat placeholders)
+to dynamically rewrite the URL path.
+
## Splats
> [Introduced](https://gitlab.com/gitlab-org/gitlab-pages/-/merge_requests/458) in GitLab 14.3.
diff --git a/doc/user/project/repository/branches/index.md b/doc/user/project/repository/branches/index.md
index 1e52aaaa211..d6bcae57322 100644
--- a/doc/user/project/repository/branches/index.md
+++ b/doc/user/project/repository/branches/index.md
@@ -301,6 +301,8 @@ When you create a merge request, the workflow checks the name of the branch. If
branch name matches the workflow, the merge request targets the branch you specify. If the branch name does not match, the merge request targets the
default branch of the project.
+Rules are processed on a "first-match" basis - if two rules match the same branch name, the top-most rule is applied.
+
Prerequisites:
- You must have at least the Maintainer role.