apache_conf 在WordPress中禁用图像的热链接

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了apache_conf 在WordPress中禁用图像的热链接相关的知识,希望对你有一定的参考价值。

Another common way to steal images from websites is by loading them from the original source. The image will load from your servers and will be displayed on third party websites without your permission.

This also increases your server load and bandwidth usage.

Here is how you can disable hotlinking of images from your WordPress site.

Simply add this code to the .htaccess file in your WordPress site’s root directory.
	
#disable hotlinking of images with forbidden or custom image option
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?wpbeginner.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC]
RewriteRule \.(jpg|jpeg|png|gif)$ – [NC,F,L] 

Don’t forget to replace wpbeginner.com with your own domain name. 

以上是关于apache_conf 在WordPress中禁用图像的热链接的主要内容,如果未能解决你的问题,请参考以下文章

apache_conf 在WordPress中禁用图像的热链接

apache_conf 禁用Pingbacks和引用[Wordpress]

apache_conf WordPress在子目录中

apache_conf 如何在Root中添加非WordPress子目录

apache_conf 如何在Root中添加非WordPress子目录

apache_conf 如何在Root中添加非WordPress子目录