.htaccess文件中加入如下代码
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?mydomain.cn(/)?.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www.)?mydomain.cn(/)?.*$ [NC]
RewriteCond %{HTTP_REFERER} !zhuaxia.com [NC]
RewriteCond %{HTTP_REFERER} !google.com [NC]
RewriteCond %{HTTP_REFERER} !baidu.com [NC]
RewriteCond %{HTTP_REFERER} !xianguo.com [NC]
RewriteRule .*.(gif|jpg|jpeg|bmp|png|swf|mp3)$ http://www.mydomain.cn/warning.xjpg [R,NC]
文章评论