Apache htaccess重定向IE用户访问主页

Apache htaccess重定向IE用户访问主页,apache,.htaccess,mod-rewrite,url-redirection,Apache,.htaccess,Mod Rewrite,Url Redirection,我想重定向所有访问主页的IE用户,但不是当他们访问网站上的其他页面时重定向到特定页面。我试图使用下面的代码,但它不工作 RewriteCond %{HTTP_USER_AGENT} *MSIE* [NC,AND] RewriteCond %{REQUEST_URI} ^/$ Rewriterule ^(.*)$ http://www.mywebsite.com/ie.html [L,R=301] 我认为问题来自于*MSIE*。 应该是.*MSIE.*或类似的: RewriteEngine

我想重定向所有访问主页的IE用户,但不是当他们访问网站上的其他页面时重定向到特定页面。我试图使用下面的代码,但它不工作

RewriteCond %{HTTP_USER_AGENT} *MSIE* [NC,AND]
RewriteCond %{REQUEST_URI} ^/$  
Rewriterule ^(.*)$ http://www.mywebsite.com/ie.html [L,R=301]

我认为问题来自于*MSIE*。 应该是.*MSIE.*或类似的:

RewriteEngine On

RewriteCond %{HTTP_USER_AGENT} MSIE [NC]
RewriteRule ^$ /ie.html [R=301,L]