Wordpress开启防盗链

.htaccess 文件常见到 [NC][L][R][F] 几个字符的含义
1、NC:no case,不区分大小写,忽略大小写;
2、R:redirect,重定向;
3、F:forbidden,禁止访问;
4、L:last,表示已是最后一条规则,.htaccess 文件解析将退出.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
RewriteEngine on
RewriteBase /wp-content/uploads/
RewriteCond %{HTTP_REFERER} ^$ [NC]
RewriteCond %{HTTP_REFERER} !limour.top [NC]
RewriteCond %{HTTP_REFERER} !zhuaxia.com [NC]
RewriteCond %{HTTP_REFERER} !xianguo.com [NC]
RewriteCond %{HTTP_REFERER} !google.com [NC]
RewriteCond %{HTTP_REFERER} !feedburner.com [NC]
RewriteCond %{HTTP_REFERER} !feedsky.com [NC]
RewriteCond %{HTTP_REFERER} !baidu.com [NC]
RewriteCond %{HTTP_REFERER} !soso.com [NC]
RewriteCond %{HTTP_REFERER} !sogou.com [NC]
RewriteCond %{HTTP_REFERER} !360.cn [NC]
RewriteRule .*\.(gifjpgpngrar)$ https://i.loli.net/2020/05/15/5BnMQzU74teqm2p.png [L]

以后用图片选择 区块-图像-媒体库 插入


Wordpress开启防盗链
https://b.limour.top/124.html
Author
Limour
Posted on
May 15, 2020
Licensed under