IMO, it is not a problem of fossil. Use RewriteEngine or whatever else. It would be enough. My Apache .htaccess is like:
<verbatim>
# You don't need this part:
<FilesMatch "\.repo$">
  Options +ExecCGI
  AddHandler cgi-script .repo
  RewriteEngine Off
</FilesMatch>

# But you need this (you might want to replace foo.repo with
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT}
RewriteRule ^(.*) [L]
</verbatim>