Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/assembly/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中实现此.htaccess?_Firebase_.htaccess_Firebase Hosting - Fatal编程技术网

如何在firebase中实现此.htaccess?

如何在firebase中实现此.htaccess?,firebase,.htaccess,firebase-hosting,Firebase,.htaccess,Firebase Hosting,我有这个。HTA的权限 Options -MultiViews RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.html [QSA,L] 我想将应用程序迁移到firebase,基本上它所做的就是让我们假设我共享了这个链接 example.com/pwa/giftLink 他被转到PWA example.com/pwa PWA将他重定向到giftLink。我不想通过代码来做,我更喜欢通过fireba

我有这个。HTA的权限

Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.html [QSA,L]
我想将应用程序迁移到firebase,基本上它所做的就是让我们假设我共享了这个链接

example.com/pwa/giftLink

他被转到PWA

example.com/pwa

PWA将他重定向到
giftLink
。我不想通过代码来做,我更喜欢通过firebase.json来做,在firebase托管中,等价物是:

"hosting": {
  // ...

  // Add the "rewrites" attribute within "hosting"
  "rewrites": [ {
    "source": "/pwa{,/**}",
    "destination": "/pwa/index.html"
  } ]
}
在Firebase托管中,等价物为:

"hosting": {
  // ...

  // Add the "rewrites" attribute within "hosting"
  "rewrites": [ {
    "source": "/pwa{,/**}",
    "destination": "/pwa/index.html"
  } ]
}

**
是什么意思?我看了一下链接的文档,我看到它在不同的地方被使用,但不是它的真正含义?它是一个Glob,匹配任意子目录中的任何文件或文件夹。看看
**
是什么意思?我看了一下链接的文档,我看到它在不同的地方被使用,但不是它的真正含义?它是一个Glob,匹配任意子目录中的任何文件或文件夹。看