【问题标题】:Deep linking on S3 not workingS3 上的深度链接不起作用
【发布时间】:2018-01-15 13:42:38
【问题描述】:

我已成功将 angular5 应用部署到: http://myApp.s3domain.amazonaws.com

Angular 路由器自动将我路由到http://myApp.s3domain.amazonaws.com/home

我的应用程序是这样构建的,参数的使用方式如下:http://myApp.s3domain.amazonaws.com/home/uniqueParameter

这个重定向到我的error.html,而不是链接。它在本地工作。

如何实现正确的深度链接?

【问题讨论】:

    标签: javascript angular amazon-s3 deployment angular5


    【解决方案1】:

    我通过使用 firebaseapp 并将 firebase.json 设置为

    解决了这个问题
    {
      "hosting": {
        "public": "dist",
        "rewrites": [
          {
            "source": "**",
            "destination": "/index.html"
          }
        ]
      }
    }
    

    现在可以了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多