【问题标题】:Dynamic link without a custom URL / suffix没有自定义 URL/后缀的动态链接
【发布时间】:2020-06-29 19:54:00
【问题描述】:

在 Firebase 中,我们可以使用动态链接重定向到另一个 URL。例如,我可以使用 https://example.com/download 之类的内容重定向到我的应用程序的下载页面 (https://play.google.com/store/apps/details?id=some.package.name)

但是,就我而言,登陆页面尚未准备好,我想将所有访问者重定向到 https://example.com 到应用程序下载页面。问题是firebase要求每个动态链接都有一个短URL(/后缀),所以我不能直接使用动态链接。

如何使用 firebase 完成这样的重定向?

【问题讨论】:

    标签: firebase firebase-hosting firebase-dynamic-links


    【解决方案1】:

    您可以使用redirects 来实现此目的。在firebase.json 中添加类似:

    {
      "hosting": {
        "redirects": [{
          "source": "/",
          "destination": "https://play.google.com/store/apps/details?id=some.package.name",
          "type": 302
        }]
      }
    }
    

    【讨论】:

      猜你喜欢
      • 2019-04-10
      • 2017-04-17
      • 2020-03-27
      • 1970-01-01
      • 2013-04-21
      • 2012-10-23
      • 2014-07-06
      • 2014-10-13
      • 2021-09-20
      相关资源
      最近更新 更多