Forum Moderators: open
If you have mod_rewrite enabled on your server, you could try something like this in your .htaccess file:
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} MSIE
RewriteCond %{REQUEST_URI} IEgoAway.html$
RewriteRule .* - [F]
Do some reading on mod_rewrite before you start using it.
It sounds a bit silly though to me to block the majority of the web's users just because they're using a browser that you don't like.
The intent is to not only get people migrated away from IE (and using competent browsers) but also limit bandwidth and associate higher quality with something other then IE. Most people need a good browser anyway, I'm baffled why my roomate doesn't even use Advant though... IE? *shivers*
Having said that, it's your site, so you can do what you want. Rather than messing with rewrite rules and server-side stuff which may unintentionally shut out users, I would recommend using an IE conditional comment in the page head, as conditional comments are certain to target only IE. The idea would be to block access to IE less than or equal to version 6 (because a future version 7 might be better). The easiest way is to do a simple meta refresh to an explanatory page, thus:
<!--[if lte IE6]><meta http-equiv="refresh" content="0;url=http://www.example.com/i-hate-ie.htm"><![endif]--> Browsers other than IE just see a comment, so ignore the refresh.
The other way, seeing as you're obviously a standards fan, is to simply use XHTML and serve it with the mime type
application/xhtml+xml. IE does not recognize this so is unable to render the page. Mozilla and Opera deal with it just fine. The disadvantage with this method is that I know of no search bots which can read application/xhtml+xml either.