.htaccess 文件正在保护我的所有目录。我怎样才能允许访问一个?

发布于 2024-09-18 07:03:49 字数 437 浏览 1 评论 0原文

我的服务器上有一个名为 dvd 的文件夹,并且我已将索引文件放入该文件夹中。如果我直接进入 /dvd/index.html 我可以查看该文件。但是,如果我只访问 /dvd/,则会收到 403 禁止错误。我确信我可以允许访问 /dvd/ 文件夹,但我不知道如何。下面是我目前正在使用的文件匹配代码。有人可以告诉我我应该做什么吗?谢谢

<FilesMatch "\.(engine|inc|info|install|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl|svn-base)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template|all-wcprops|entries|format)$">
  Order allow,deny
</FilesMatch>

I've got a folder on my server called dvd and I've put an index file in this folder. If i go directly to /dvd/index.html I can view the file. However, if I go only to /dvd/ I get a 403 forbidden error. I'm sure I can allow access to the /dvd/ folder but I can't figure out how. Below is the filesmatch code i'm using at the moment. Can someone please tell me what it is I'm supposed to be doing? Thanks

<FilesMatch "\.(engine|inc|info|install|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl|svn-base)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template|all-wcprops|entries|format)$">
  Order allow,deny
</FilesMatch>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

π浅易 2024-09-25 07:03:49

添加

将DirectoryIndex index.html

到.htaccess中,好像没有设置是否可以直接查看。

Add

DirectoryIndex index.html

to the .htaccess, seems like it's not set if you can view it directly.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文