知乎專欄 | 多維度架構 | 微信號 netkiller-ebook | QQ群:128659835 請註明“讀者” |
SetEnvIf Referer "http://news.netkiller.com/" local_referal SetEnvIf Referer "$" local_referral Order Deny,Allow Deny from all Allow from env=local_referal
配置httpd.conf檔案
#LoadModule rewrite_module modules/mod_rewrite.so
去掉前面的"#"註釋
AllowOverride None
改為
AllowOverride All
配置.htaccess檔案
RewriteEngine on RewriteCond % !^http://xxx.cn/.*$ [NC] RewriteCond % !^http://xxx.cn$ [NC] RewriteCond % !^http://www.xxx.cn/.*$ [NC] RewriteCond % !^http://www.xxx.cn$ [NC] RewriteRule .*\.(jpg|jpeg|gif|png|bmp|rar|zip|exe)$ http://download.example.com/err.html [R,NC]