Web Firebase主机将www.example.com重定向到example.com
我已经通过Firebase主机完成了我的网站设置,一切正常。 问题是我的网站从Web Firebase主机将www.example.com重定向到example.com,web,firebase,firebase-realtime-database,Web,Firebase,Firebase Realtime Database,我已经通过Firebase主机完成了我的网站设置,一切正常。 问题是我的网站从www.example.com重定向到example.com 我怎样才能预防它?如何始终www.example.com/ 这是我的firebase.json: "hosting": { "public": "files", "ignore": [ "firebase.json", "**/.*" ], "headers": [ { "source" : "**/*.@(jpg|jpeg|gif|png)",
www.example.com
重定向到example.com
我怎样才能预防它?如何始终www.example.com/
这是我的firebase.json
:
"hosting": {
"public": "files",
"ignore": [
"firebase.json",
"**/.*"
],
"headers": [ {
"source" : "**/*.@(jpg|jpeg|gif|png)",
"headers" : [ {
"key" : "Cache-Control",
"value" : "max-age=7200"
}]
}],
"cleanUrls": true }
您已将
example.com
注册为您网站中的域。因此,域指向那里
将该域注册为
www.example.com
,它将始终显示如下。请注意,您的TXT
记录仍在apex上(即example.com
),您可以保持DNS配置不变,假设www
和apex都已正确指向Firebase主机。非常感谢。将www.example.com
连接到Firebase主机,然后它会自动询问您是否要将example.com
重定向到www.example.com
。