Fix domain level redirects
What does this MR do?
Browsing \google.com
automatically resolves it to google.com
. Thus, adding a /\domain.name.com
in _redirects
file would redirect to domain.name.com
. We do not allow domain-level redirects at all. This MR fixes that.
Steps to verify the change
- Add a
_redirects
file to thepublic
folder of a plain-html pages repo.
/test-boo/test1.html /test-boo/index.html 301
/test-boo/test2.html /test-boo/index.html 302
/test-boo/test3.html /test-boo/boo.html 301
/test-boo/test4.html /test-boo/boo.html 302
/test-boo/test5.html /test-boo/index.html 301
/test-boo/test6.html /test-boo/index.html 302
/test-boo/test7.html /test-boo/boo.html 301
/test-boo/test8.html /test-boo/boo.html 302
/test-boo/test9.html /\www.google.com 301
/test-boo/test10.html /\www.google.com 302
- Start Pages server and browse http://your-group.pages.gdk.test:3010/your-project/_redirects
- Validate that it is showing the last 2 rules as invalid
TODO
-
I added the Changelog
trailer (e.g.Changelog: added
) to the commits that need to be included in the changelog -
I added unit tests or they are not required -
I added acceptance tests or they are not required -
I added documentation (or it's not required) -
I followed code review guidelines -
I followed Go Style guidelines
Edited by Vishal Tak