使用 github 页面安全 https 重定向并且 letsencrypt 不起作用
Secure https redirect with github pages and letsencrypt doesn't work
我有两个域:example.com 和 example.org。
HTTP://www.example.com redirects to HTTPS://www.example.org (as expected)
HTTP://example.com redirects to HTTPS://www.example.org (as expected)
HTTP://www.example.org redirects to HTTPS://www.example.org (as expected)
HTTP://example.org redirects to HTTPS://www.example.org (as expected)
HTTPS://example.org redirects to HTTPS://www.example.org (as expected)
但是,使用 HTTPS 不起作用。我认为这是因为我还没有证明我对我的 CA 拥有 example.com(让加密通过 GitHub 页)。
HTTPS://www.example.com should redirect to HTTPS://www.example.org
HTTPS://example.com should redirect to HTTPS://www.example.org
This 问题是相关的,但它有点让我头疼,我不确定如何在 Github 带有 Namecheap 的页面上实现它。
我通过迁移到 netlify 解决了这个问题。我推荐。
我使用信息 here and here 创建了一个 _redirects 文件,如下所示:
https://example.com/* https://www.example.org/:splat 301!
https://www.example.com/* https://www.example.org/:splat 301!
http://example.com/* https://www.example.org/:splat 301!
http://www.example.com/* https://www.example.org/:splat 301!
我有两个域:example.com 和 example.org。
HTTP://www.example.com redirects to HTTPS://www.example.org (as expected)
HTTP://example.com redirects to HTTPS://www.example.org (as expected)
HTTP://www.example.org redirects to HTTPS://www.example.org (as expected)
HTTP://example.org redirects to HTTPS://www.example.org (as expected)
HTTPS://example.org redirects to HTTPS://www.example.org (as expected)
但是,使用 HTTPS 不起作用。我认为这是因为我还没有证明我对我的 CA 拥有 example.com(让加密通过 GitHub 页)。
HTTPS://www.example.com should redirect to HTTPS://www.example.org
HTTPS://example.com should redirect to HTTPS://www.example.org
This 问题是相关的,但它有点让我头疼,我不确定如何在 Github 带有 Namecheap 的页面上实现它。
我通过迁移到 netlify 解决了这个问题。我推荐。
我使用信息 here and here 创建了一个 _redirects 文件,如下所示:
https://example.com/* https://www.example.org/:splat 301!
https://www.example.com/* https://www.example.org/:splat 301!
http://example.com/* https://www.example.org/:splat 301!
http://www.example.com/* https://www.example.org/:splat 301!