RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://www.samool.com/.*$ [NC]   
RewriteCond %{HTTP_REFERER} !^http://www.samool.com$ [NC]   
RewriteCond %{HTTP_REFERER} !^http://samool.com/.*$ [NC]   
RewriteCond %{HTTP_REFERER} !^http://samool.com$ [NC] 
RewriteRule .*\.(gif|jpg|mp3|rm|wma|exe|rar|zip)$ http://www.samool.com/403.html [R,NC]

请将以上内容保存为.htaccess文件,放在网站根目录,修改红色网址为你的网址,绿色为错误页面。

Last modification:August 16th, 2009 at 12:30 pm
如果觉得我的文章对你有用,请随意赞赏