移动网站的用户代理

时间:2012-03-16 19:41:16

标签: html .htaccess jquery-mobile user-agent

我已经完成了一个移动网站,现在我希望这个网站在ipod / iphone中移动设备,现在我在网站上有一个文件.htaccess文件。以下是htaccess文件的代码

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

现在我有我的移动网站的html文件index.html,我想要用户代理检测的代码。但是,我无法知道文件的添加位置。

我可以通过PHP代码在html文件中添加此文件。

由于

现在我将.htaccess filre保存在子目录中,我无法对我的网站产生任何影响。

0 个答案:

没有答案
相关问题