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

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/shared
diff options
context:
space:
mode:
authorNathan Friend <nathan@gitlab.com>2021-08-20 13:52:09 +0300
committerNathan Friend <nathan@gitlab.com>2021-08-20 13:52:09 +0300
commit5fff32dd852a27151a08dea0cb2a8fd2983d7f65 (patch)
tree0e5c56af88f83f1550bbaf90f433eda4da7cfd5d /shared
parentca330e78ad92ea79939a5df9b70f3c627a62eecf (diff)
Splat and placeholder support in _redirects
This commit adds support for Netlify-style splats (*) and :placeholders in the _redirects file. Changelog: added
Diffstat (limited to 'shared')
-rw-r--r--shared/pages/group.redirects/project-redirects/public.zipbin1223 -> 2452 bytes
-rw-r--r--shared/pages/group.redirects/project-redirects/public/_redirects23
-rw-r--r--shared/pages/group.redirects/project-redirects/public/blog-post-2021-08-12.html1
-rw-r--r--shared/pages/group.redirects/project-redirects/public/rakis/visitors-guide.html1
-rw-r--r--shared/pages/group.redirects/project-redirects/public/spa/existing-file.html1
-rw-r--r--shared/pages/group.redirects/project-redirects/public/spa/index.html1
-rw-r--r--shared/pages/group/project/public/_redirects1
7 files changed, 18 insertions, 10 deletions
diff --git a/shared/pages/group.redirects/project-redirects/public.zip b/shared/pages/group.redirects/project-redirects/public.zip
index c6421223..88c2cbb0 100644
--- a/shared/pages/group.redirects/project-redirects/public.zip
+++ b/shared/pages/group.redirects/project-redirects/public.zip
Binary files differ
diff --git a/shared/pages/group.redirects/project-redirects/public/_redirects b/shared/pages/group.redirects/project-redirects/public/_redirects
index 04c44ee4..0adee383 100644
--- a/shared/pages/group.redirects/project-redirects/public/_redirects
+++ b/shared/pages/group.redirects/project-redirects/public/_redirects
@@ -1,11 +1,14 @@
-/project-redirects/redirect-portal.html /project-redirects/magic-land.html 302
-/project-redirects/cake-portal.html /project-redirects/still-alive.html 302
-/project-redirects/jobs/* /project-redirects/careers/:splat
-/project-redirects/wardrobe.html /project-redirects/narnia.html 302
+/project-redirects/redirect-portal.html /project-redirects/magic-land.html 302
+/project-redirects/cake-portal.html /project-redirects/still-alive.html 302
+/project-redirects/jobs/* /project-redirects/careers/:splat
+/project-redirects/arrakis/* /project-redirects/rakis/:splat 200
+/project-redirects/wardrobe.html /project-redirects/narnia.html 302
/project-redirects/news/:year/:month/:date/:slug /project-redirects/blog/:year/:month/:date/:slug
-/project-redirects/pit.html /project-redirects/spikes.html 302
-/project-redirects/goto-domain.html https://GitLab.com/pages.html 302
-/project-redirects/goto-bare-domain.html GitLab.com/pages.html 302
-/project-redirects/goto-schemaless.html //GitLab.com/pages.html 302
-/project-redirects/cake-portal/ /project-redirects/still-alive/ 302
-/project-redirects/file-override.html /project-redirects/should-not-be-here.html 302
+/project-redirects/pit.html /project-redirects/spikes.html 302
+/project-redirects/goto-domain.html https://GitLab.com/pages.html 302
+/project-redirects/goto-bare-domain.html GitLab.com/pages.html 302
+/project-redirects/goto-schemaless.html //GitLab.com/pages.html 302
+/project-redirects/cake-portal/ /project-redirects/still-alive/ 302
+/project-redirects/file-override.html /project-redirects/should-not-be-here.html 302
+/project-redirects/spa/* /project-redirects/spa/index.html 200
+/project-redirects/blog/:year/:month/:day /project-redirects/blog-post-:year-:month-:day.html 200
diff --git a/shared/pages/group.redirects/project-redirects/public/blog-post-2021-08-12.html b/shared/pages/group.redirects/project-redirects/public/blog-post-2021-08-12.html
new file mode 100644
index 00000000..58cea2d0
--- /dev/null
+++ b/shared/pages/group.redirects/project-redirects/public/blog-post-2021-08-12.html
@@ -0,0 +1 @@
+Rewrites are pretty neat!
diff --git a/shared/pages/group.redirects/project-redirects/public/rakis/visitors-guide.html b/shared/pages/group.redirects/project-redirects/public/rakis/visitors-guide.html
new file mode 100644
index 00000000..dca3a06b
--- /dev/null
+++ b/shared/pages/group.redirects/project-redirects/public/rakis/visitors-guide.html
@@ -0,0 +1 @@
+Welcome to Dune!
diff --git a/shared/pages/group.redirects/project-redirects/public/spa/existing-file.html b/shared/pages/group.redirects/project-redirects/public/spa/existing-file.html
new file mode 100644
index 00000000..25e581b4
--- /dev/null
+++ b/shared/pages/group.redirects/project-redirects/public/spa/existing-file.html
@@ -0,0 +1 @@
+This is an existing file
diff --git a/shared/pages/group.redirects/project-redirects/public/spa/index.html b/shared/pages/group.redirects/project-redirects/public/spa/index.html
new file mode 100644
index 00000000..2c48053e
--- /dev/null
+++ b/shared/pages/group.redirects/project-redirects/public/spa/index.html
@@ -0,0 +1 @@
+This is an SPA
diff --git a/shared/pages/group/project/public/_redirects b/shared/pages/group/project/public/_redirects
new file mode 100644
index 00000000..a8c19716
--- /dev/null
+++ b/shared/pages/group/project/public/_redirects
@@ -0,0 +1 @@
+/project/old/path/* /project/index.html 200