title: Need to make htaccess rule that blocks empty user agent unless the request contains a specific string
body: <p>I want to block empty user agents for bad-bot reasons. So I had this rule: </p>
  
  <pre><code>RewriteCond %{HTTP_USER_AGENT} ^-?$
  RewriteRule ^ - [F]
  </code></pre>
  
  <p>Now one of our customers uses an RSS aggregator whose request for his feed comes in as a "-" user agent... So I'm trying to add a condition to this rule that says "if the request does not contain /feed" then block the access... So this is the main thing I've tried: </p>
  
  <pre><code>RewriteCond %{HTTP_USER_AGENT} ^-?$
  RewriteCond %{REQUEST_URI} !^(.*)(/feed)(.*)$
  RewriteRule ^ - [F]
  </code></pre>
  
  <p>But the request is still getting blocked. I know it's just this rule set blocking it because if I comment it out then the request comes through fine. </p>
  
  <p>Any help would be greatly appreciated!</p>