【问题标题】:Publish Github pages in Subdomain of custom domain error在自定义域错误的子域中发布 Github 页面
【发布时间】:2019-11-29 02:22:06
【问题描述】:

这似乎是一个相当流行的话题,但我仍然无法解决我的问题。我有一个域 http://www.illiteratibooksandcoffee.com/,它指向我在 github 上的 illiterati 存储库。现在我创建了一个子域theotherspace.illiteratibooksandcoffee.com/,它指向我在github中的theotherspace repo。我的问题是,当我以username.github.io/theotherspace 测试网站时,它工作正常,但设置theotherspace.illiteratibooksandcoffee.com/ 后,我的页面将无法呈现,并且出现以下错误。

这在 Firefox 控制台上:

这是在 chrome 控制台上:

下面是我在github上的配置:

我的 CNAME 记录似乎也设置正确:

我很茫然,非常感谢任何输入!

【问题讨论】:

    标签: github subdomain github-pages cname namecheap


    【解决方案1】:

    正如@Belouccio 在this 帖子中所回答的那样,必须将 github 上 docs 文件夹中 index.html 中的 base href="/myproject/" 更改为 base href="/"。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-07-15
      • 2012-11-29
      • 1970-01-01
      • 2020-08-25
      • 2017-04-04
      • 1970-01-01
      • 1970-01-01
      • 2019-04-26
      相关资源
      最近更新 更多