Firebase主机重定向到shebang



我在firebase上托管了一个SPA,它使用哈希路由(例如路由/urls是mysite.com/#!/mypath(。

我正在尝试配置firebase主机以重定向来自";mysite.com/mypath";至";mysite.com/#/mypath";但是我运气不好。我试过:

"rewrites": [
{
"source": "/:path*",
"destination": "/index.html/#!/:path"
}
]

和:

"rewrites": [
{
"source": "**",
"destination": "/index.html/#!/"
}
]

以及:

"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
],
"redirects": [
{
"source": "/:path*",
"destination": "/#!/:path",
"type": 301
}
]

这样做可能吗?路径也可以类似于";mysite.com/mypath1/part2";,等

Firebase Hosting重定向捕获当前无法应用于查询参数或哈希。如果这是你想看到的东西,请提交一个功能请求!

最新更新