我如何移除GitHub Pages子域名重定向?

3
我有一个Namecheap域名,它是somedomain.example。我不小心将存储在博客仓库中的somedomain.example/blog/更改为blog.somedomain.example。现在即使我删除了CNAME记录并从GitHub页面设置中删除自定义URL,我的somedomain.example/blog/仍然被重定向到blog.somedomain.example。
有没有办法取消这个重定向并以默认方式使用它?
附言:我的gh-pages仓库中现在没有CNAME。
1个回答

1
我有类似的问题。 在我的情况下,我只有一个分支:gh-pages(例如,repo.github.io)。
git branch -> * gh-pages

我成功的做法是创建分支: master;

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

实际上,我认为这是一个诡计。

只需确认在gh-pages分支中以及主要的master分支中没有CNAME文件

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

您可以测试是否仍然通过 cURL在线 进行重定向;

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

我希望这对你也有效。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接