For whatever reason you may want to create Drupal servers that are "read-only" in nature, in my case I wanted to disallow people from logging into our static content servers instead of our one single master server (see this article on MySQL replication for Drupal 6). In this case the installation was using Microsoft IIS 7.5 with PHP extensions. I found that the best way is to use IIS' built-in functionality:
How to use IIS 7.5 URL rewrite and request filtering with PHP 5 and Drupal 6 to block logins (keep site users to anonymous only); this basically makes the site read-only. There are two ways to login, one with a query (www.site.com/?q=user/login) and one with a URL (www.site.com/user/login). You use the URL rewrite for the queries (?q=) and the URL filtering for the URLs (/user/login):
Now your users will get a 403 error if they try to login to the read-only servers; the next iteration will be to redirect them to the "master" server which does allow them to login...
Caveat: This configuration is replicated with the site file content (web.config), so if you want to do this, don't do it at the site level, do it at the server (top) level so it doesn't get replicated with the site to the master server. This is only a problem if you are replicating content with something like DFS/FRS.