-
I put this rule into htaccess file to deny empty referers which is returning 403
SetEnvIfNoCase Referer "^$ " bad_user Deny from env=bad_user
I can see the log, it’s denying also Googlebot which is acting as empty referrer also. Is there a way to modify the rule to allow access Googlebot and deny all the rest empty referrers?
-
I have blocked one referrer
www.example.com
usingRewriteCond %{HTTP_REFERER} example\.com [NC] RewriteRule .* - [F]
working well, returning 403, but if he is referring from
example.com/another_page
?
So I did this:
RewriteCond %{HTTP_REFERER} example\.com [NC,OR] RewriteCond %{HTTP_REFERER} example/another_page\.com/ RewriteRule .* - [F]
is it correct?