firebase-hosting - 基于子域的 Firebase 重写

标签 firebase-hosting

我有一个托管在 firebase 上的项目。我想使用域和子域,如下所示:

example.com: rewrite to index-landing.html
app.example.com: rewrite to index.html

那可能吗?我在 firebase.json 的托管部分尝试了以下内容:
"rewrites": [
  {
    "source": "https://example.com",
    "destination": "/index-landing.html"
  },
  {
    "source": "https://app.example.com/**",
    "destination": "/index.html"
  }
]

有任何想法吗?

最佳答案

我有同样的问题。我认为重写只支持目录而不是子域。简单的解决方案是创建两个不同的 Firebase 项目。

关于firebase-hosting - 基于子域的 Firebase 重写,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43767095/

相关文章:

seo - Firebase 为 SPA 托管 SEO

Firebase 托管 - 密码保护网站?

reactjs - 在 Firebase 托管中将 Firebase 与 React 结合使用

dns - 如何在 Firebase 上创建自定义子域?

firebase 部署错误和 fiebase.json 空文件

node.js - 部署 Firebase 项目时出现错误显示 'cannot find module firebase-functions'

reactjs - 如何在自定义域上部署我的 React.js 更改?

reactjs - 将服务器端渲染添加到 Firebase 上托管的现有 React+Redux+React-Router 应用程序

firebase - 将 Firebase SSL 托管用于两个不同的 Web 应用程序

Angular 2 Firebase Hosting 似乎需要哈希标记