Home > Backend Development > PHP Tutorial > 伪静态的正则话语

伪静态的正则话语

WBOY
Release: 2016-06-13 12:29:57
Original
1035 people have browsed it

伪静态的正则语句
在网上找了很多资料,都是以下图片防盗链代码。我现在遇上的问题是加上了这三条语句所有的都被防了,自己网站上也显示不了。RewriteCond Referer: (?!http://(?:www\.xxx\.com)).+ 这句应该是除www.xxx.com外的网址进行防盗链,但是这句好像没起作用,求高手指点。

# 防盗链
RewriteCond Host: (.+)
RewriteCond Referer: (?!http://(?:www\.xxx\.com)).+
RewriteRule .*\.(?:gif|jpeg|jpg) /block.png [I,O]

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template