【发布时间】:2020-10-31 06:26:39
【问题描述】:
我正在使用 Firebase 托管。我有 index.html 文件。
它通过 Firebase URL 和自定义域打开。
如果有人尝试打开 example.com 它应该打开 index.html
但如果有人尝试打开example.com/?link=https://google.com,它应该在链接参数中动态打开 URL。
我不知道我做错了什么。即使存在链接参数。它仍然会打开 index.html 文件。
这是我的 firebase.json
{
"hosting": {
"public": "public",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"appAssociation": "AUTO",
"rewrites": [
{
"source": "/?link**",
"dynamicLinks": true
},
{
"source": "!/?link**",
"destination": "/index.html"
}
]
}
}
【问题讨论】:
标签: firebase firebase-hosting firebase-dynamic-links