darxus: (Default)
darxus ([personal profile] darxus) wrote2009-07-12 07:40 pm
Entry tags:

How to deny access to your Apache web server to all Microsoft browser users

RewriteCond %{REQUEST_URI} !^/fail/$
RewriteCond %{HTTP_USER_AGENT} .*MSIE.*
RewriteRule .* /fail/ [R]

This redirects to the /fail/ page on your web site.

It will be interesting to see what happens to my log files.

(Reason in previous post.)

[identity profile] milktree.livejournal.com 2009-07-13 12:03 am (UTC)(link)
So, just for curiosity, why would you want to do that?

[identity profile] darxus.livejournal.com 2009-07-13 12:05 am (UTC)(link)
I added the link to my previous post around the same time you commented.

[identity profile] marmota.livejournal.com 2009-07-13 01:10 am (UTC)(link)
That rocks.

[identity profile] darxus.livejournal.com 2009-07-13 01:12 am (UTC)(link)
Thank you.

[identity profile] marmota.livejournal.com 2009-07-13 01:19 am (UTC)(link)
It might be more productive in the long run to rather than block, redirect to a simple page with a rant message along the lines of, "we're sorry, the browser you are currently using does not comply with internationally recognized standards. Please notify your browser vendor, or switch to one that does.".

[identity profile] darxus.livejournal.com 2009-07-13 01:22 am (UTC)(link)
Apparently the links in my post were too subtle.

I am redirecting all MSIE users to http://www.chaosreigns.com/fail/

[identity profile] marmota.livejournal.com 2009-07-13 01:34 am (UTC)(link)
speaking of browsers then, my browser of choice (w3m) does not highlight links. Guess it's not compliant!
wotw: (Default)

[personal profile] wotw 2009-07-13 01:50 am (UTC)(link)
My browser is lynx, version 2.8.6. It fails the
acid3 test rather spectacularly, but I can still
access your page.