V
V
Valery2012-06-13 16:58:14
PHP
Valery, 2012-06-13 16:58:14

Duplicate request. Google Chrome + Denver

Good afternoon, maybe someone faced the following problem?

1. There is a local Denver. I didn't change any settings, everything is default.

2. There is an index.php file with the following content:

file_put_contents('tst.log', 'line'.PHP_EOL, FILE_APPEND);
exit;

3. Nearby there is .htaccess:
RewriteEngine On
RewriteRule .* index.php

Everything is fine in all browsers, you make one request - the script is executed once.
In the latest version of Chrome, you make one request... and, suddenly, the script is executed twice.
Disable RewriteEngine - and lo and behold, everything works as it should.

On a real server, everything is fine, but such glitches with Denver interfere, because. everything is done twice.

* I do not want to use another browser. I would like to figure out where I made a mistake in this case
** Writing to the file was used just to see the number of script executions
*** I tried it on a clean Chrome profile
**** Googled that the problem is in chrome itself, because. it sends the header and body of the request separately, but what to do with it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mikhail Osher, 2012-06-13
@Akuma

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !favicon\.ico
RewriteRule .* index.php

E
ertaquo, 2012-06-13
@ertaquo

It tries to request favicon.ico from you, but it redirects to the script.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question