如何阻止用户使用.htaccess只看到我的文件?

发布于 2025-02-14 01:58:59 字数 291 浏览 0 评论 0原文

我有一个.json文件,并且我正在使用Ajax获取数据,但是我希望没有人能够看到该文件或使用它。

这是行不通的,因为为什么我甚至无法与Ajax访问

<Files "*.json">
      Order Deny, Allow
      deny from all
      allow from localhost
</Files>

我希望没有人能看到该文件或使用该文件,只有我的网站,以及任何访问我的网站的人都看不到它也

I have a .json file, and I'm using ajax to get the data, but I would like no one to be able to see the file, nor use it.

This doesn't work, because why not even i can access with ajax

<Files "*.json">
      Order Deny, Allow
      deny from all
      allow from localhost
</Files>

I wish that no one could see the file or use it, only my website, and anyone who accesses my website can't see it too

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

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

发布评论

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