2017-05-03 43 views
2

我有一個託管在firebase上的項目。我想使用域和子域如下:基於子域的Firebase重寫

example.com: rewrite to index-landing.html 
app.example.com: rewrite to index.html 

這可能嗎?我已經在firebase.json的託管部分下試過以下內容:

"rewrites": [ 
    { 
    "source": "https://example.com", 
    "destination": "/index-landing.html" 
    }, 
    { 
    "source": "https://app.example.com/**", 
    "destination": "/index.html" 
    } 
] 

任何想法?

+0

嗨@jloosli我們正在尋找這樣做。你找到什麼了嗎? –

+0

@AlanHaverty不通過firebase ...我結束了使用兩個項目,並指出在兩個不同的dns。 – jloosli

回答

1

我有同樣的問題。我認爲重寫只支持目錄而不是子域名。簡單的解決方案是創建兩個不同的Firebase項目。