You should be aware that this is by no means a great way to do security. Far from it actually. Its trivial to change your User-Agent in most browsers. So this really only works if people play nice. There are a number of ways to do most things, this just happens to be another. Here is an example:
<VirtualHost *>
ServerAdmin root@localhost
ErrorLog logs/dummy-host.example.com-error_log
CustomLog logs/dummy-host.example.com-access_log common
AuthUserAgentDeny Mozilla
<Location /test>
AuthUserAgentAllow Mozilla
</location>
</VirtualHost>
Its pretty trivial, I hope it works for you.
-Brian Aker (brian@tangent.org)
Seattle, Washington.
