基本上,Apache 目录中的所有文件都无法访问,除了图像。图像应该是可访问的,但前提是通过网站加载。如果我根据referer设置Apache规则很容易绕过: http: //www.mustap.com/phpzone_post_62_how-to-bypass-the-referer-se 当然这不是正确的选择。
我的 Apache 配置文件:
<Directory /var/www/path>
Order allow,deny
Deny from all
Options -Indexes
# Check against the referer, first level check
SetEnvIf Referer domain1\.com domain1
SetEnvIf Referer domain1\.com domain2
<FilesMatch \.(jpg|jpeg|gif|png)$>
Order deny,allow
Deny from all
Allow from env=domain1
Allow from env=domain2
</FilesMatch>
</Directory>
如何在不将图像放入数据库的情况下解决此问题?
谢谢