是否有任何解决方案可以防止具有空用户代理字符串的 http 请求(最好使用 .htaccess)?
最佳答案
#redirect empty user agent, UNLESS it's accessing the RSS feed
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteCond %{REQUEST_URI} !^/rss.php # <-- path to rss.php
RewriteRule .* http://%{REMOTE_ADDR}/ [R,L]
关于.htaccess - 如何阻止空的用户代理请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23200076/