如何阻止我的.htaccess文件将iPad用户重定向到我的移动网站?

时间:2021-08-14 09:48:15

I my .htaccess file I currently have:

我目前拥有的.htaccess文件:

RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} "smartphone|rover|ipaq|au-mic,|alcatel|ericy|vodafone\/|wap1\.|wap2\.|iPhone|android"[NC]
RewriteCond %{REQUEST_URI} !^/m/
RewriteRule ^.*$ http://www.mydomain.com/m/$0 [R=301,L]

When someone logs in with an iPad he/she gets redirected =/ to the mobile version as well. I'd like them to see the normal site (without the /m/).

当有人使用iPad登录时,他/她也会被重定向= /移动版本。我希望他们看到正常的网站(没有/ m /)。

1 个解决方案

#1


0  

Add another one

再添一个

RewriteCond %{HTTP_USER_AGENT} "iPad"[NC]
RewriteCond %{REQUEST_URI} !^/
RewriteRule ^.*$ http://www.mydomain.com/$0 [R=301,L]

#1


0  

Add another one

再添一个

RewriteCond %{HTTP_USER_AGENT} "iPad"[NC]
RewriteCond %{REQUEST_URI} !^/
RewriteRule ^.*$ http://www.mydomain.com/$0 [R=301,L]