Use.Htaccess to prevent images from being stolen
specific operation, put.Htaccess files in the picture directory (the host appears not to support this function), content as follows / > >
[code]RewriteEngine on
RewriteCond%{HTTP_REFERER}! ^ $.#91; NC.#93;
RewriteCond%{HTTP_REFERER}! 91; NC.#93;
RewriteCond%{HTTP_REFERER}! Baidu.com.#91; NC.#93;
RewriteRule.
[code]RewriteCond%{HTTP_REFERER}! ^ $.#91; NC.#93;
RewriteCond%{HTTP_REFERER}! Biaodianfu.com.#91. />
RewriteCond%{HTTP_REFERER}! Baidu.com.#91; NC.#93; [/code]
this part of the code is to judge whether or not to steal the chain, that is, if the user is not directly input, not from Google or Baidu, the following turn is performed:
[code]RewriteRule. Gif.#91; R, NC, L.#93; [/code]
if the following formatting file (jpg, GIF, PNG, BMP, SWF, etc.) is stolen, all files are replaced with the pictures under the directory. (it is important to note that the images that are replaced are not placed in the directory of the chain of theft). If the above rules determine that the picture request is not a theft chain, the following turn is performed:
[code]RewriteRule ^ (. *) $http:\/\/image.biaodianfu.com\/image\/$1.#91; L.#93; [/code]
meaning is that all requests under the directory are turned to the target server, such as a picture original The URL is http://www.biaodianfu/img/logo.gif, now it will go to http://image.biaodianfu/image/logo.gif. Until now, you need to copy all the files from the original server img directory to the image directory of the picture server, so that the turn will be really available.
to prevent others from stealing chains, just change the file format.
the meaning of R, NC, and L under the name of the passing book: R refers to the turn, and NC refers to the case of no case. The function of L is to indicate the end of this turn, and the subsequent turn is not affected by the previous judgment statement.
also recommends a website for online generation of.Htaccess files to prevent chain theft: http://www.htmlbasix.com/disablehotlinking.shtml