是否有任何解决方案可以阻止具有空用户代理字符串的http请求,最好使用.htaccess?
答案 0 :(得分:1)
#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]