WebKit的浏览器(Chrome浏览器,Safari浏览器)加载从的.htaccess重定向两次的页面!浏览器、两次、重定向、加载

2023-09-02 00:55:05 作者:動了情,傷了心

我有这个问题。当你浏览网页,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 ... :-/