I must redirect IE user to other website and from IE6 to IE9 this code working very good:

 <!--[if IE]><script type="text/javascript">window.location = "google.com";</script><![endif]-->

This code working very good for IE 10:

 <script type="text/javascript">if (navigator.appName == 'Microsoft Internet Explorer'){self.location = "google.com"}</script>

But I can't find any solution for IE11 - in this browser my website doesn't redirect.

Maybe you know how to write only one script to redirect all IE browsers to other website?

Please Don't Do This.

Browser detection is known to be very unreliable and is not future proof at all.
<sub>As evidenced by you having this problem in the first place.</sub>

Instead, detect browser features and deliver what you need to based off those.

Check out these resources:

  • http://modernizr.com/
  • http://www.quirksmode.org/js/support.html

If you have to do this, then you can use any of these methods:

Ex:

<!-- language: lang-js -->
if (!!navigator.userAgent.match(/Trident.*rv\:11\./)) {self.location = "google.com"}