【问题标题】:How to redirect IE11 to a new page?如何将 IE11 重定向到新页面?
【发布时间】:2016-11-05 15:22:41
【问题描述】:

这可以将 IE 重定向到新页面,但我只想将 IE11 重定向到新页面。有什么想法吗?

<!--[if IE]>
<meta HTTP-EQUIV="REFRESH" content="0; url=http://www.google.com">
<![endif]-->

这是 IE 11 用户代理 --> Mozilla/5.0 (IE 11.0; Windows NT 6.3; Trident/7.0; .NET4.0E; .NET4.0C; rv:11.0) 像 Gecko

【问题讨论】:

  • 有人有想法吗?

标签: .htaccess internet-explorer redirect internet-explorer-11


【解决方案1】:

在文档根目录的 htaccess 中:

RewriteEngine on


 RewriteCond %{HTTP_USER_AGENT} IE11 [NC]
 RewriteRule ^ http://google.com/ [L,R]

【讨论】:

  • 我将上面的代码放在域 htaccess 文件中,但是所有的 IE11 访问者仍然会来,而不是重定向到我选择的域。任何其他想法如何阻止 IE11 访问者?
  • 尝试放置在顶部(在其他 RewriteRules 之前)
  • 是的,这是我放置代码开始的地方,在 htaccess 中的其他重写规则之上。还有其他人知道如何将所有 IE11 访问者重定向到另一个页面吗?
猜你喜欢
  • 1970-01-01
  • 2013-02-14
  • 2021-04-05
  • 2010-11-08
  • 1970-01-01
  • 2019-07-16
  • 1970-01-01
  • 2014-12-02
  • 1970-01-01
相关资源
最近更新 更多