RewriteEngine On
#RewriteCond %{HTTP_USER_AGENT} ^.*MSIE.*
RewriteCond %{HTTP_USER_AGENT} "^Mozilla/4/.0 /(compatible; MSIE.*"
RewriteCond %{HTTP_USER_AGENT} ".*Windows.*"
RewriteCond %{HTTP_USER_AGENT} "!.*Windows CE.*"
#RewriteCond %{HTTP_USER_AGENT} !^.*Opera.*
RewriteRule ^/ym(.*)$ http://ip/b.html [R,L,QSA]
RewriteEngine On
RewriteRule ^/ym(.*)$ http://ip/a.html [R,L,QSA]
当区分浏览器时:
前面要求IE和Mozilla浏览器用户访问:
http://www.abc.com/ym 跳转到了http://ip/b.html
后面要求非IE和Mozilla浏览器的用户将跳到http://ip/a.html
匹配方式是从前往后