如何删除 GitHub 页面子域重定向?

How do I remove GitHub pages sub-domain redirection?

我有一个 Namecheap 域名,它是 somedomain.example。我不小心将博客存储库中的 somedomain.example/blog/ 更改为 blog.somedomain.example。现在,即使我删除 CNAME 记录并从 GitHub 页面设置中删除自定义 URL,我的 somedomain.example/blog/ 仍会被重定向到 blog.somedomain.example .

有什么方法可以删除此重定向并按原样使用默认方式吗?

P.S 我的 gh-pages 存储库中现在没有 CNAME。

我也有类似的问题。 在我的例子中,我只有分支:gh-pages(例如 repo.github.io);

git branch -> * gh-pages

对我有用的是创建分支master

git branch master ->
git branch -> gh-pages, * master
git push origin master

(其实我觉得是套路)

确认 NO CNAME filegh-pages 中,主要在 master 分支中。

https://github.com/username/repo.github.io/blob/master/CNAME -> 404
https://github.com/username/repo.github.io/blob/gh-pages/CNAME -> 404

您可以通过cURLonline测试您是否仍在重定向;

e.g. http://redirectcheck.com/index.php

我希望这对你也有用。