레퍼럴이 www.example.com 아닌 사이트에서 /web/images 디렉토리에 접근하는 것을 막는 것입니다.
Prevent "Image Theft"
This example shows how to keep people not on your server from using images on your server as inline-images on their pages. This is not a recommended configuration, but it can work in limited circumstances. We assume that all your images are in a directory called /web/images.
SetEnvIf Referer "^http://www.example.com/" local_referal
# Allow browsers that do not send Referer info
SetEnvIf Referer "^$" local_referal
<Directory /web/images>
Order Deny,Allow
Deny from all
Allow from env=local_referal
</Directory>
출처 : http://httpd.apache.org/docs/1.3/mod/mod_setenvif.html#setenvif
http://httpd.apache.org/docs/1.3/mod/directive-dict.html#Context
SetEnvIf 에서 사용할 수 있는것은 아래와 같습니다.
Remote_Host - the hostname (if available) of the client making the request
Remote_Addr - the IP address of the client making the request
Request_Method - the name of the method being used (GET, POST, et cetera)
Request_Protocol - the name and version of the protocol with which the request was made (e.g., "HTTP/0.9", "HTTP/1.1", etc.)
Request_URI - the portion of the URL following the scheme and host portion
http://httpd.apache.org/docs/1.3/env.html
'웹&컴퓨팅' 카테고리의 다른 글
랜섬웨어란? 랜섬웨어에 대한 대응. (0) | 2016.12.06 |
---|---|
CSS 줄바꿈 / 글자 자르기 (0) | 2015.10.15 |
[PHP] isset, is_null, ===null, ==null, empty (0) | 2015.06.09 |
PHP 4.x 버전에서 json_encode, json_decode와 같이 사용 클래스 (0) | 2015.04.14 |
윈도우즈 8.1 작업표시줄 멈춤현상 (프리징) (0) | 2015.03.20 |