W
W
weranda2018-08-18 18:00:39
htaccess
weranda, 2018-08-18 18:00:39

What's the difference between these two .htaccess entries?

I still don't understand the difference between the following two entries in .htaccess:

RewriteCond %{HTTP_REFERER} ^$ [NC] 
RewriteCond %{HTTP_USER_AGENT} ^$ [NC] 
RewriteRule .* - [F]

# И

RewriteCond %{HTTP_REFERER} ^$ [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^$ [NC] 
RewriteRule .* - [F]

All the difference is in [OR]. Please explain the logic/difference.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Kim, 2018-08-18
@weranda

In the first case, the rule should work when there is neither a user agent nor a referrer.
In the second case, when there is either neither one nor the other.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question