我正在尝试以下代码以仅在 url 包含某些 wordpress 页面并且用户代理为空白或匹配(curl/perl/php 等)时匹配。但是,即使 REQUEST_URI 不匹配,它也会这样做。语句的流程是错误的吗?
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} ^-?$ [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (havij|libwwwperl|wget|python|nikto|curl|scan|java|winhttp|clshttp|loader) [NC]
RewriteCond %{REQUEST_URI} !^/(wp-login.php|wp-admin/|wp-content/plugins/|wp-includes/).* [NC]
RewriteRule .* - [F,NS,L]
谢谢