Warning: include_once(): open_basedir restriction in effect. File(/www/wwwroot/rixin.info/www/wp-content/plugins/wp-super-cache/wp-cache-phase1.php) is not within the allowed path(s): (/www/wwwroot/www.rixin.info/:/tmp/) in /www/wwwroot/www.rixin.info/www/wp-content/advanced-cache.php on line 22

Warning: include_once(/www/wwwroot/rixin.info/www/wp-content/plugins/wp-super-cache/wp-cache-phase1.php): failed to open stream: Operation not permitted in /www/wwwroot/www.rixin.info/www/wp-content/advanced-cache.php on line 22

Warning: include_once(): Failed opening '/www/wwwroot/rixin.info/www/wp-content/plugins/wp-super-cache/wp-cache-phase1.php' for inclusion (include_path='.:') in /www/wwwroot/www.rixin.info/www/wp-content/advanced-cache.php on line 22

Warning: include(): open_basedir restriction in effect. File(/www/wwwroot/rixin.info/www/wp-content/plugins/wp-super-cache/wp-cache-base.php) is not within the allowed path(s): (/www/wwwroot/www.rixin.info/:/tmp/) in /www/wwwroot/www.rixin.info/www/wp-content/plugins/wp-super-cache/wp-cache.php on line 95

Warning: include(/www/wwwroot/rixin.info/www/wp-content/plugins/wp-super-cache/wp-cache-base.php): failed to open stream: Operation not permitted in /www/wwwroot/www.rixin.info/www/wp-content/plugins/wp-super-cache/wp-cache.php on line 95

Warning: include(): Failed opening '/www/wwwroot/rixin.info/www/wp-content/plugins/wp-super-cache/wp-cache-base.php' for inclusion (include_path='.:') in /www/wwwroot/www.rixin.info/www/wp-content/plugins/wp-super-cache/wp-cache.php on line 95

Warning: include_once(): open_basedir restriction in effect. File(/www/wwwroot/rixin.info/www/wp-content/plugins/wp-super-cache/ossdl-cdn.php) is not within the allowed path(s): (/www/wwwroot/www.rixin.info/:/tmp/) in /www/wwwroot/www.rixin.info/www/wp-content/plugins/wp-super-cache/wp-cache.php on line 118

Warning: include_once(/www/wwwroot/rixin.info/www/wp-content/plugins/wp-super-cache/ossdl-cdn.php): failed to open stream: Operation not permitted in /www/wwwroot/www.rixin.info/www/wp-content/plugins/wp-super-cache/wp-cache.php on line 118

Warning: include_once(): Failed opening '/www/wwwroot/rixin.info/www/wp-content/plugins/wp-super-cache/ossdl-cdn.php' for inclusion (include_path='.:') in /www/wwwroot/www.rixin.info/www/wp-content/plugins/wp-super-cache/wp-cache.php on line 118
Z-blogPHP图片防盗链代码规则|网站建设

Z-blogPHP图片防盗链代码规则

现在网站经常被采集或者模仿,特别是网站图片等内容最容易被盗链,那么Z-blogPHP怎么样防盗链呢?

花了一点时间搞懂了这个防盗链功能,分享出来,希望能帮助到有需要的朋友。

RewriteEngine on 
RewriteCond %{HTTP_REFERER} !baidu.com [NC]
RewriteCond %{HTTP_REFERER} !google.com [NC]
RewriteCond %{HTTP_REFERER} !txcstx.cn [NC]
RewriteRule .*\.(gif|jpg)$ /band.txt [NC,L]

代码解释:上面的txcstx.cn修改为你自己的域名;band.txt为被盗链后的提示文件(放在根目录内容自己编辑);(gif|jpg)这些为文件类型,可以根据自己的需求增加,例如我就是将gif|jpg|png|js|css等文件全部做了仿盗链的。

最后,这段代码放到哪里去呢?

如果你的主机或者服务器是”win系统“添加到httpd.conf里面;如果是linux系统则添加到.htaccess里面。

Z-blogPHP图片防盗链代码规则:等您坐沙发呢!

发表评论

表情
还能输入210个字