0

大家好,我发现这个代码.htaccess 来阻止一个网站,但不明白为什么第一行是[NC, OR] 而第二个链接没有?如果我想阻止 2 个或更多网站的流量,可以吗?

RewriteEngine on
# Options +FollowSymlinks
RewriteCond %{HTTP_REFERER} lsale02\.ru [NC,OR]
RewriteCond %{HTTP_REFERER} esoqld.ru\.ru  <------- **does not have [NC,OR]**
RewriteRule .* - [F]
4

1 回答 1

0

如果您想拒绝访问更多网站,请在下面添加更多内容。小通知,每一点都需要转义:

RewriteEngine on
# Options +FollowSymlinks
RewriteCond %{HTTP_REFERER} lsale02\.ru [NC,OR]
RewriteCond %{HTTP_REFERER} another\.ru [NC,OR]
RewriteCond %{HTTP_REFERER} esoqld\.ru\.ru [NC]   # last one doesn't need OR because there will be no more conditions.
RewriteRule .* - [F]  # returns a 403 [F]orbidden
于 2016-04-01T15:19:57.757 回答