Blocking IE
I never like IE. It's slow. It has broken CSS and Javascript support. Its security is compromised. And a host of other reasons.
And because my blog looks ugly on it.
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} ^.*MSIE.*$
RewriteRule ^.* http://rumahfirman.com/noie.html [L]
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} ^.*MSIE.*$
RewriteRule ^.* http://noie.rumahfirman.com [L]
http://www.useragentstring.com/pages/useragentstring.php
And because my blog looks ugly on it.
So I decided to block access to my blog through .htaccess and provide a suggestion to use other more standards compliant browsers. The following was my first attempt.
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} ^.*MSIE.*$
RewriteRule ^.* http://rumahfirman.com/noie.html [L]
So I intended to redirect the visitor using MSIE to noie.html where I write lines suggesting them to use other browsers. It created an endless loop. I then realised the problem. When accessing noie.html, the browser will first access rumahfirman.com and thus re-reading my .htaccess file. I then changed it to the following, which worked well.
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} ^.*MSIE.*$
RewriteRule ^.* http://noie.rumahfirman.com [L]
Plus, in the course of trying to find user agent string for IE, I found the following very nifty website. It lists user agent strings of all known user agents.
http://www.useragentstring.com/pages/useragentstring.php
0 komentar:
Posting Komentar