2017-10-12 262 views
-3

我無法在Firebase上託管我的網站。我的文件(包括index.html)已上傳到Firebase。Firebase網站部署

當我輸入firebase給出的URL時,我得到一個404錯誤。但是,如果我鍵入我的URL並在末尾添加「/ index」,它將起作用。

有關如何解決該問題的任何建議?

回答

1

這聽起來像你在你的firebase.json文件中丟失了一個重寫。

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

有關配置選項的更多信息,請參閱Firebase hosting documentation