RewriteCond %{HTTP_USER_AGENT} "Mobile|iPhone|Android|WAP|NetFront|JAVA|OperasMini|UCWEB|WindowssCE|Symbian|Series|webOS|SonyEricsson|Sony|BlackBerry|Cellphone|dopod|Nokia|samsung|PalmSource|Xphone|Xda|Smartphone|PIEPlus|MEIZU|MIDP|CLDC|Kindle" [NC]
RewriteRule ^index.html$ /mobile.php?g=User&m=Login&a=login [L]
RewriteRule ^index.html$ /index.php?g=Index&m=Index&a=index [L]
我的PC端和手机端项目代码在一块,域名也都一样,但是首页地址又不一样,在rewrite里加上判断正好解决这个问题