用户代理的移动应用htaccess文件 [英] User agent for mobile application htaccess file

查看:167
本文介绍了用户代理的移动应用htaccess文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经做了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]

这篇关于用户代理的移动应用htaccess文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆