Remove file extensions for html files in firebase

橙三吉。 提交于 2020-06-27 04:24:07

问题


In firebase.json, is there a way to rewrite (not redirect) all requests to the corresponding .html file but leave other extensions?

for example, https://example.com/foo will be the same as https://example.com/foo.html.

But https://example.com/data will not be the same as https://example.com/data.xml.


回答1:


This is the cleanUrls option (as in the docs) in firebase.json:

{
  "hosting": {
    "cleanUrls": true
  }
}


来源:https://stackoverflow.com/questions/60681599/remove-file-extensions-for-html-files-in-firebase

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!