问题
I have done a jquery mobile application. Now i want to run the url in mobile device only and desktop device are shoeing false.
After a long time i am trying the htaccess file in application folder where the index.html is there.
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.
Is there something i missed here ?
回答1:
Try with those lines:
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]
来源:https://stackoverflow.com/questions/9749109/user-agent-for-mobile-application-htaccess-file