基本的に、画像を除いて、Apache ディレクトリ内のすべてのファイルにアクセスできません。画像にアクセスできる必要がありますが、Web サイトから読み込まれた場合に限ります。リファラーに基づいてApacheルールを設定すると、非常に簡単にバイパスできます: http://www.mustap.com/phpzone_post_62_how-to-bypass-the-referer-se もちろん、それは正しい選択ではありません。
私のApache confファイル:
<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>
画像をDBに入れずにこれを解決するにはどうすればよいですか?
ありがとう