如何将.htaccess转换为Firebase设置(firebase.json)

时间:2019-07-15 16:38:37

标签: firebase .htaccess hosting firebase-hosting

我很难将以下.htaccess设置转换为firebase.json配置。我试图找到一些在线转换无济于事。

RewriteEngine on
RewriteCond %{HTTP_HOST} ^[^.]+\.[^.]+$
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

采用这种语法

{
  "hosting": {
    "public": "public",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ],

    "rewrites": [
      {
        "source": "/**",
        "dynamicLinks": true
      }
    ]
  }
}

0 个答案:

没有答案