2017-10-12 174 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