Add simple redirect configuration
### Problem to solve The current advice for redirects in GitLab pages is to use [meta refresh tags](https://docs.gitlab.com/ee/user/project/pages/introduction.html#redirects-in-gitlab-pages), which is a fairly poor experience for people used to building 1000-line-long nginx configuration files full of redirects. ### Proposal Is there scope for adding a simple redirect configuration specifically for GitLab pages? It could then serve the redirects itself as a HTTP 30x response. It'd just need a simple format text format specifying sourceurl, desturl, and optionally HTTP code (301/302/etc). SSGs like Hugo could then write extension modules to take their lists of aliases and generate this file, rather than HTML pages for each. ### MVP Implementation Add support for basic 301 and 302 redirects using the [Netlify plain text file syntax (`_redirects`)](https://docs.netlify.com/routing/redirects/#syntax-for-the-redirects-file). ``` /news /blog /pit.html /spikes.html 302 ``` We won't support any of the extra syntax [options like query parameters, splats, rewrites](https://docs.netlify.com/routing/redirects/redirect-options/) in this iteration but can come after. This is now implemented in https://gitlab.com/gitlab-org/gitlab-pages/-/merge_requests/336 and documentation is in https://gitlab.com/gitlab-org/gitlab/-/merge_requests/42011 ### To-do - [x] Blocked by https://gitlab.com/gitlab-org/gitlab-pages/-/merge_requests/325 - [x] Acceptance tests - [x] Benchmarks - https://dave.cheney.net/2013/06/30/how-to-write-benchmarks-in-go - https://golang.org/pkg/testing/#B.Error - [x] Feature flag - [x] Docs -> https://gitlab.com/gitlab-org/gitlab/-/merge_requests/42011 - [x] Try out Netlify behavior of file overriding redirect, https://gitlab.com/gitlab-org/gitlab-pages/-/merge_requests/336#note_403520570 - [x] Add feature flag to https://ops.gitlab.net/gitlab-cookbooks/chef-repo and verify feature - https://docs.gitlab.com/ee/development/feature_flags/ - https://ops.gitlab.net/gitlab-cookbooks/chef-repo/-/merge_requests/4246 - [ ] Remove `FF_ENABLE_REDIRECTS` feature flag -> https://gitlab.com/gitlab-org/gitlab-pages/-/merge_requests/357 - [ ] Remove docs for the feature flag too-> https://gitlab.com/gitlab-org/gitlab/-/merge_requests/42759 - https://gitlab.com/gitlab-org/gitlab/-/merge_requests/42011 - [ ] After merge and ship, remove from chef-repo - https://ops.gitlab.net/gitlab-cookbooks/chef-repo/-/merge_requests/4247 - https://ops.gitlab.net/gitlab-cookbooks/chef-repo/-/merge_requests/4246 ---
issue