如何解决Firebase托管重定向到shebang
我在Firebase上托管了一个SPA,该SPA使用哈希路由(例如,路由/网址为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重定向捕获当前无法应用于查询参数或哈希。如果您希望看到此内容,请file a feature request!
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。