Tuesday, January 15, 2008

直リンクの禁止 バーチャルドメインの場合

<VirtualHost 192.168.*.*>
ServerName example.com
DocumentRoot /home/example/htdocs
ServerAdmin webmaster@www.hoge.co.jp
ErrorLog logs/error_log
TransferLog logs/access_log

#<Files *.gif>

<Files ~ "\.(tbz|tgz|bz2|gz|tar|lzh|zip|mag|png|jpeg|jpg|gif)$">

SetEnvIf referer "^http://example\.com" RefOk
Order Deny,Allow
Deny from all
Allow from env=RefOk
</Files>

</VirtualHost>

No comments: