Fix broken redirects
If there's a full URL set in redirect_to
, take it into account.
Test redirect_to
with:
-
Full URL ending in .md
is used as is (.md
is not converted to.html
), for example if we want to use a full URL pointing to a Markdown file on GitLab.com. An edge case, but nice to have. I tested locally withredirect_to: https://docs.gitlab.com/charts/index.md
. -
Full URL ending in .html
- Tested locally with the charts redirects https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/26159, for exampleredirect_to: https://docs.gitlab.com/charts/index.html
works as expected. -
Full URL ending in /
- http://fix-redirects.178.62.207.141.xip.io/ce/development/ux_guide/ -
Relative URL ending in .md
- http://fix-redirects.178.62.207.141.xip.io/ce/profile/README.html -
Relative URL ending in .md#anchor
- http://fix-redirects.178.62.207.141.xip.io/ce/ci/autodeploy/index.html
Old method still works:
-
gitlab-basics/create-group.md
contains only the old method:This document was moved to [another location](../user/group/index.md#create-a-new-group).
- http://fix-redirects.178.62.207.141.xip.io/ce/gitlab-basics/create-group.html
Misc:
-
http://fix-redirects.178.62.207.141.xip.io/ce/development/documentation/ doesn't redirect. This was previously a bug that led us to revert https://gitlab.com/gitlab-com/gitlab-docs/merge_requests/380#note_123324301
Edited by Achilleas Pipinellis