gpt4 book ai didi

.htaccess - 允许在 firebase 上列出子目录

转载 作者:行者123 更新时间:2023-12-05 08:09:33 26 4
gpt4 key购买 nike

我想允许在 firebase 上列出一个子目录,但是我找不到任何文件来编辑它:https://www.firebase.com/docs/hosting/guide/url-redirects-rewrites.html

我的目录 /images 包含超过 100 张图片,以后可以添加更多,所以我希望能够使用 ajax 请求来列出内容,然后将其用作 JSON 对象。最后一部分应该没问题 ( Is there a way to return a list of all the image file names from a folder using only Javascript? )

但默认情况下,当尝试转到任何子文件夹时,firebase 总是返回 404

我尝试过使用 .htaccess 类似的东西:

Options +Indexes

IndexIgnore *

但是firebase似乎忽略了.htaccess

最佳答案

Firebase 托管没有列出目录内容的选项。您可以包含包含这些文件的 index.html,这会产生相同的结果。

关于.htaccess - 允许在 firebase 上列出子目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35313276/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com