终于无法忍受盗链……

Posted by eDWARD at 17:29

防止盗链接的图片
防止盗链接的图片

   自从上次在博客中推荐《you are my everything》以后,服务器的流量突然多了起来,有几次甚至导致了VPS的当机。后来经过分析:盗链这个MP3的网页包括诸如QQ空间、校内网空间、更有甚者还放到了Taobao小店、个人博客也有不少,全部作为了背景音乐,并且导致各种爬虫疯狂抓取这个文件。找到了问题原因就只有一个办法了,就是利用Apache的mod_rewrite模块把盗链行为拒之门外。

  1. 前提Apache中的mod_rewrite模块为激活状态,既然要消灭掉mp3文件的盗链就顺便也把图片盗链的设置给做了,下面是我在网站根目录的.htaccess文件中的配置,供同病相怜之人参考:。

Filed In 学习路上 | Study | Tags: , , | 8 Comments »

Your Comments.

Leave your own response

8 Responses to “终于无法忍受盗链……”

Leave a Reply.

Comment Form.

Fields denoted with a "*" are required. Your comment may require moderation, please be patient.

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>




Your Reply.

Use the following link to trackback from your own site:
http://www.zhangzhang.net/2008/02/rewrite-it/trackback/

Spread the word.

Octopus supports RSS feed for this post RSS 2.0 , and Trackbacks from other blogs.


Fatal error: Call to undefined function get_single_sidebar() in /home/zhangzha/public_html/wp-content/themes/octopus/single.php on line 69