# This should work in .htaccess SetEnvIf User-Agent MyScript GoAway=1 Order allow,deny Allow from all Deny from env=GoAway