I have not been able to deny access to a User-Agent, I have tried two different solutions in .htaccess:
Order allow,deny
Allow from all
SetEnvIf User-Agent "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1" bad_ua=1
Deny from env=bad_ua
and
RewriteCond %{HTTP_USER_AGENT} "^Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1"
RewriteRule ^ - [F,L]
neither works any help would be welcome John