3

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

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

PS 我的 gh-pages 存储库中现在没有 CNAME。

4

1 回答 1

1

我有一个类似的问题。就我而言,我只有分支:(gh-pages例如 repo.github.io);

git branch -> * gh-pages

那么对我有用的是创建分支master;

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

(其实我觉得是个把戏)

只需确认分支中主要没有 CNAME 文件即可。gh-pagesmaster

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

cURL您可以通过或测试您是否仍在重定向online

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

我希望这也适用于你。

于 2018-09-04T20:07:13.367 回答