如何防止文件直接访问URL?我正在使用Apache,我在我的本地主机,比如: http://localhost/test/中的文件test文件夹: index.html
sample.jpg
.htaccess样本来源index.html:<html>
<body>
<img src="sample.jpg" />
</body>
</html>当我在http://localhost/test/,它将简单地显示页面上的图像“sample.jpg”。问题:我想防止图像显示为http://localhost/test/sample.jpg就在酒吧里。注: 当在每个浏览器上进行测试时,我发现下面的解决方案是有效的。除了火狐.
3 回答
千万里不及你
TA贡献1784条经验 获得超9个赞
/etc/apache/httpd.conf
Options Includes Indexes FollowSymLinks MultiViews
Options Includes FollowSymLinks MultiViews
添加回答
举报
0/150
提交
取消