WebKit的浏览器(Chrome浏览器,Safari浏览器)加载从的.htaccess重定向两次的页面! [英] Webkit browsers (Chrome, Safari) are loading pages redirected from .htaccess twice!

查看:354
本文介绍了WebKit的浏览器(Chrome浏览器,Safari浏览器)加载从的.htaccess重定向两次的页面!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个问题。当你浏览网页,PHP是code:

I have this problem. When you visit page where is PHP code:

$_SESSION['test']++;
echo $_SESSION['test'];

和页面重定向throught的.htaccess

And page is redirected throught .htaccess

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} ^(.+)\.php$
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)\.php index.php?rw=1&page=$1 [QSA,L]

因此​​,在非webkit的浏览器,你会看到1,通过下一个刷新2,3,4,5 ... 但在Chrome或Safari,你会看到1,3,5,7,...

So in non-webkit browsers you will see 1, on next refresh 2, 3, 4, 5 ... But in Chrome or Safari you will see 1, 3, 5, 7, ...

是否有人有一些想法如何解决呢?我只需要每一个页面重定向到的index.php,然后加载内容......但每一个滚泥版重定向它同样的结果......两次装!因此,当有一个MySQL查询时,它被处理两次,...: - /

Does anybody have some idea how to solve it? I just need every page redirect to index.php and then load content ... but with every f***ed redirect it has same result ... twice loaded! So when there is a MySQL query, it is processed twice, ... :-/

感谢您! :)

推荐答案

问题是,这有:

<iframe src="#"></iframe>

的Webkit得到了与它的问题,和加载页面两次......所以解决方案就是

Webkit has got problems with it, and load pages twice ... so solution is

<iframe src="http://www.example.com/blankPage.html"></iframe>

这是所有! 10小时疯狂后...: - /

It is all!!! After 10 hours of madness ... :-/

这篇关于WebKit的浏览器(Chrome浏览器,Safari浏览器)加载从的.htaccess重定向两次的页面!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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