我使用脚本生成器 - http://detectmobilebrowsers.com/ - 检测手机,以便将页面重定向到具有手机特殊模板的子域.
我只对手机感兴趣.Ipad,Android平板电脑不会被重定向.我需要知道的是,这个脚本是否涵盖了IPhone 4和IPhone 5,因为我没有这些模型来测试它.无论如何,我已经使用开发人员菜单 - 用户代理 - Safari ios 4.3.3 Iphone在Safari上进行了测试,并根据需要重定向页面.这对我想要的还是足够的,或者我也应该使用以下脚本:
var iphone4 = (window.screen.height == (960 / 2)) ? true : false;
var iphone5 = (window.screen.height == (1136 / 2)) ? true : false;
if (iphone4 && iphone5) {
parent.location.href='http://www.mobile.mysite.com';
}
Run Code Online (Sandbox Code Playgroud) 我应该添加哪些行以从网站中删除扩展名.html和.php扩展名?
我仅将其用于此.html部分:
RewriteEngine on
RewriteBase /
RewriteCond %{http://jobler.ro/} !(\.[^./]+)$
RewriteCond %{REQUEST_fileNAME} !-d
RewriteCond %{REQUEST_fileNAME} !-f
RewriteRule (.*) /$1.html [L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^.]+)\.html\ HTTP
RewriteRule ^([^.]+)\.html$ http://jobler.ro/$1 [R=301,L]
Run Code Online (Sandbox Code Playgroud)
但我需要将两个文件类型扩展名从同一域中隐藏。
我可以根据它的风格隐藏DIV吗?
我有这个我需要隐藏的div:
<div style="font-family: helvetica, sans-serif; text-align: center; text-transform: uppercase; font-size: 9px; letter-spacing: 2px; font-weight: bold; padding: 3px 0px 5px !important; color: rgb(170, 170, 170) !important; clear: both;">...</div>
Run Code Online (Sandbox Code Playgroud)
请有人给我一个例子.
DIV正在从另一个站点加载,所以我无法直接控制使用"display:none".