用户代理的移动应用htaccess文件文件、用户、htaccess

2023-09-02 09:51:32 作者:求佛不如拜我

我已经做了jQuery Mobile的应用程序。现在,我要运行的URL中唯一的移动设备和桌面设备都穿上鞋子假的。

I have done a jquery mobile application. Now i want to run the url in mobile device only and desktop device are shoeing false.

在很长一段时间我试图在应用程序文件夹中的htaccess文件,其中的index.html是存在的。

After a long time i am trying the htaccess file in application folder where the index.html is there.

我的htaccess文件是

mY htaccess file is

RewriteCond %{REQUEST_URI} !^/http://originalsite.com/.*$
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
RewriteRule ^(.*)$ /http://www.othersite.com/ [L,R=302]

现在我不能让我的网站的效果。

NOW I can not get the effect in my site.

有什么我错过了吗?

推荐答案

试着用这些行:

RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
RewriteRule ^(.*)$ http://www.othersite.com [L,R=302]