Redirecting from /doc to root
requires /doc/index.md with:
---
layout: forward
target: https://MySite.github.io/index.html
---
Note that the link to root requires a target document /index.html
The /doc/index.md will be compiled to /doc/index.html. And the /index.html is auto-generated.
Otherwise you'll get the error:
404
File not found
The site configured at this address does not contain the requested file.
If this is your site, make sure that the filename case matches the URL as well as any file permissions.
For root URLs (like http://example.com/) you must provide an index.html file.
Read the full documentation for more information about using GitHub Pages.