下面是我做的,和老师返回的略有不同。求解...
HTTP/1.1 200 OK
Date: Mon, 20 Mar 2017 12:43:57 GMT
Server: Apache/2.4.10 (Win32) OpenSSL/1.0.1i mod_fcgid/2.3.9
X-Powered-By: PHP/5.6.1
Transfer-Encoding: chunked
Content-Type: text/html;charset=utf-8
10
PHP is very good
0
HTTP/1.1 200 OK
Date: Mon, 20 Mar 2017 12:43:57 GMT
Server: Apache/2.4.10 (Win32) OpenSSL/1.0.1i mod_fcgid/2.3.9
X-Powered-By: PHP/5.6.1
Transfer-Encoding: chunked
Content-Type: text/html;charset=utf-8
10
PHP is very good
0
2017-03-20
RewriteCond %{REQUEST_REFERER} !^http://localhost/.*$ [NC]
这个不行,用这个设置,在本站点下也会被屏蔽
吧REQUEST_REFERER 换成HTTP_REFERER就可以了
这个不行,用这个设置,在本站点下也会被屏蔽
吧REQUEST_REFERER 换成HTTP_REFERER就可以了
2017-03-19
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} .*\.(jpg|png|jpeg|gif) [NC]
RewriteCond %{REQUEST_REFERER} !^http://localhost/.*$ [NC]
RewriteRule .* vip.png
</IfModule>
用localhost访问也没重定向到vip.png了
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} .*\.(jpg|png|jpeg|gif) [NC]
RewriteCond %{REQUEST_REFERER} !^http://localhost/.*$ [NC]
RewriteRule .* vip.png
</IfModule>
用localhost访问也没重定向到vip.png了
2017-03-19