Use a YAML file to populate the _redirects file
The redirects file is pretty limited in what it can contain. In #923 (closed), we found out that the comments we were using, actually rendered the redirects invalid.
Proposal
Use a YAML file ad use the entries to populate the _redirects
file. It would look something like:
redirects:
- from: /ee/administration/auth/google_secure_ldap.html
to: /ee/administration/auth/ldap/google_secure_ldap.html
remove_date: 2021-11-01
- from: /ee/administration/auth/how_to_configure_ldap_gitlab_ce/index.html
to: /ee/administration/auth/ldap/index.html
remove_date: 2021-11-01
- from: /ee/administration/auth/how_to_configure_ldap_gitlab_ce/
to: /ee/administration/auth/ldap/index.html
remove_date: 2021-11-01
In this case, we would use the from
and to
entries to create the redirects file, but the remove_date
would be just used as metadata by us, to know when to remove the entries.
Edited by Achilleas Pipinellis