简体   繁体   English

我正在尝试使用 .htaccess 阻止访问我网站上的图像文件夹

[英]I'm trying to prevent access images folder on my the website with .htaccess

我正在尝试使用 .htaccess 阻止访问我网站上的图像文件夹,这里是我的文件夹http://192.168.1.55/onlineshop/images/

if .htaccess file is not working than you can add index.html file in your folder with content of forbidden access, while anyone open's that url than index.html file will run.如果 .htaccess 文件不起作用,那么您可以将 index.html 文件添加到您的文件夹中,其中包含禁止访问的内容,而任何人打开的那个 url 都将运行,而不是 index.html 文件。 So your folder is prevent from direct use.所以你的文件夹是禁止直接使用的。

Hope this will helps you.希望这会帮助你。

在图像文件夹中创建 .htaccess 文件,即http://192.168.1.55/onlineshop/images/.htaccess并在 .htaccess 文件中添加以下代码

Deny from all

使用以下内容在该文件夹中创建 .htaccess。

Deny from all

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我在文件夹的.htaccess文件中犯了什么错误? - What mistake I'm making in .htaccess file for my folder? 我正在尝试在 php 中验证发送到我的网站的回调 - I'm trying to validate the callback send to my website in php 我正在尝试在我的网站中使用dokuwiki解析器引擎 - I'm trying to use dokuwiki parser engine in my website Yii2 .htaccess阻止访问后端中的图像 - Yii2 .htaccess prevent to access images in backend 我试图从一个文件夹中显示多个随机的非重复图像,但我得到了空白图像 - I'm trying to display multiple random non repeating images from a folder but I get blank images 我正在尝试在我的网站中创建一个搜索选项,但未显示任何内容。 我是初学者 - I'm trying to create a search option in my website but nothing displayed . I'm a beginner htaccess重定向后,从移动网站访问父网站的文件夹 - Access folder of parent website from mobile website after htaccess redirect 我正在尝试使一个函数(按钮)将图像上传到CodeIgniter(PHP)中的数据库。 但是我出错了 - I'm trying to make a function (button) to upload images to my database in CodeIgniter (PHP). But I'm getting an error 我正在尝试用密码保护我的网站,当我弹出窗口登录并使用我的信用凭证时 - I'm trying to password protect my website and when i get the popup to login and i use my creds 当我限制访问一个文件夹时,它将影响所有网站.htaccess - When I restrict access to one folder it's affecting all the website .htaccess
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM