2.3 Apache配置防盗链

ExpiresDefault "now plus 0 min"

 </IfModule>

 SetEnvIfNoCase Referer "^http://.*\.test\.com" local_ref   //列入白名单的域名

  SetEnvIfNoCase Referer ".*\. apelearn\.com" local_ref

  SetEnvIfNoCase Referer "^$" local_ref

  <filesmatch "\.(txt|doc|mp3|zip|rar|jpg|gif|png)">       //限制链接访问的后缀

  Order Allow,Deny

  Allow from env=local_ref

  </filesmatch>


你可能感兴趣的:(2.3 Apache配置防盗链)