Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/firebase/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Firebase托管重写在本地工作,但不在云中工作-bug?_Firebase_Firebase Hosting - Fatal编程技术网

Firebase托管重写在本地工作,但不在云中工作-bug?

Firebase托管重写在本地工作,但不在云中工作-bug?,firebase,firebase-hosting,Firebase,Firebase Hosting,这是我的firebase.json文件: { "hosting": { "target": "md-viewer", "public": "public", "ignore": [ "firebase.json", "**/.*", "**/node_modules/**" ], "rewrites": [ { "source": "/", "destination": "crea

这是我的
firebase.json
文件:

{
  "hosting": {
    "target": "md-viewer",
    "public": "public",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ],
    "rewrites": [
      {
      "source": "/",
      "destination": "create_md.html"
    },
    {
      "source": "/view/*",
      "destination": "show_md.html"
    }]
  }
}
运行
firebase-service
时,重写工作正常。但是,部署并打开我的应用程序(“
appname.firebaseapp.com
”)会返回
404
。部署是成功的,因为我可以自定义404页面,并通过直接请求来访问我的文件(
appname.firebaseapp.com/show_md.html

怎么了?
firebase服务是否应该镜像联机行为?

如果重写规则上的“目的地”键是文件,则必须使用绝对路径引用它:

    "rewrites": [
      {
      "source": "/",
      "destination": "/create_md.html"
    },
    {
      "source": "/view/**",
      "destination": "/show_md.html"
    }]
此外,“/视图”重写需要两个星号,根据