gpt4 book ai didi

firebase-hosting - 在 Firebase 中托管的网站不会加载 "www."

转载 作者:行者123 更新时间:2023-12-02 00:49:17 31 4
gpt4 key购买 nike

我是网络世界的新手。我创建了网站,将其托管在 Firebase Hosting 中,但我发现如果使用“www”。在完整的 url 之前,它会导致“无法加载该页面”。为什么会这样?

test.firebaseapp.com - 这是有效的

www.test.firebaseapp.com - 这不起作用

我可以做的配置是部署配置,它是 .json 文件,在我的例子中看起来像这样:

{
"hosting": {
"public": "Pedia",
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}

用“www”在 chrome 中打开网站。我明白了: enter image description here

我应该重定向它吗?

最佳答案

要将 www.test.firebaseapp.com 重定向到 test.firebaseapp.com 则需要添加 CNAME 记录。

要将test.firebaseapp.com重定向到www.test.firebaseapp.com,需要添加A记录。

请检查域的 DNS 条目。

关于firebase-hosting - 在 Firebase 中托管的网站不会加载 "www.",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41271000/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com