发布于 2025-02-01 09:34:41 字数 498 浏览 2 评论 0原文

无论出于邪恶的原因,.htaccess文件都无法正常工作。

我的.htaccess文件只是:

<Files .htaccess>
  Order allow,deny
  Deny from all
</Files>
<Directory ~ "\LAB3\backups">
  Order allow,deny
  Deny from all
</Directory>

从理论上讲,它应该拒绝所有访问.htaccess和目录“ \ lab3 \ backups”,除了没有,然后返回200而不是403。

我怀疑问题可能是我在XAMPP文件夹外运行它。 我的XAMPP安装文件夹在C:/XAMPP中,而我正在运行的服务器的实际位置为〜/tmp/phptmp,但是IDK。

For whatever unholy reason, the .htaccess file just doesn't work correctly.

My .htaccess file is just:

<Files .htaccess>
  Order allow,deny
  Deny from all
</Files>
<Directory ~ "\LAB3\backups">
  Order allow,deny
  Deny from all
</Directory>

Theoretically, it should deny all access to .htaccess and the directory "\LAB3\backups", except it doesn't, and return 200 instead of 403.

I suspect the problem might be the fact that I'm running it outside of the XAMPP folder.
My XAMPP installation folder is in C:/xampp, while the actual place I'm running the server is ~/tmp/phptmp, but idk.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文