Is the site called twice?

My problem is that my php site is being called twice. But I do not know why. in my access log I also get two entries if I reload:

127.0.0.12 - - [13/Oct/2010:20:41:56 +0200] "POST /index.php HTTP/1.1" 200 1493 "http://mkw-testing/index.php" "Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.36 Safari/534.7"
127.0.0.12 - - [13/Oct/2010:20:41:57 +0200] "GET /favicon.ico HTTP/1.1" 200 1498 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.36 Safari/534.7"

my error.log shows:

[Wed Oct 13 21:08:35 2010] [debug] mod_deflate.c(615): [client 127.0.0.12] Zlib: Compressed 2766 to 1067 : URL /index.php
[Wed Oct 13 21:08:35 2010] [debug] mod_deflate.c(615): [client 127.0.0.12] Zlib: Compressed 2743 to 1038 : URL /index.php/favicon.ico

What can I do? I have no redirect, reboot aso. in javascript code.

thanks4help

may be a problem with cookies?

shell I use htaccess file to get the site, is it called only once?

UPDATE

- !! , , , . . . , , ..... , : -S, , ....

html:

<html> 
    <head> 
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
        <link rel="icon" href="favicon.ico" type="image/x-icon"> 
        <title>Testsuite</title> 

        <style type="text/css"> 
            ...

        </style> 

    </head> 
    <body> 
<!--script type="text/javascript">alert("go home!");</script--> 
<p style="font-size: smaller; color: #555"> 
Testcases ID: 75<br> 
Verbleibend: 94.5 % noch zu checken...<br> 
</p> 

<div id="action"> 
<h2>Suchprofile</h2> 
<p> 
    Screen number: B01 (4)<br> 
    Pfad: /search/type<br><br> 
</p> 
</div> 

<h2></h2> 

<form name="testsuite" action="/index.php" method="POST"> 
    <p style="width: 650px;"> 
        <span style="color: gray">Ausgangassituation:</span> Der User befindet sich auf der /search/type Seite. <br> 
        <span style="color: gray">Eingabe:</span> Der User klickt auf ?Dieses Suchprofil speichern?.         <br><br> 
        Reaktionen
        <input type="hidden" name="id_testcase" value="75" /> 
    </p> 
    <table width="650" border="1" cellspacing="0" cellpadding="0" > 
            <tr> 
            <td>Es &ouml;ffnet sich ein Eingabefeld </td> 
            <td class="checkbox"><input type="checkbox" name="requirements[]" value="103" /></td> 
        </tr> 
            <tr> 
            <td>Rechts neben dem Eingabefeld wird ein Plus-Symbol angezeigt.</td> 
            <td class="checkbox"><input type="checkbox" name="requirements[]" value="104" /></td> 
        </tr> 
        </table> 

    <br> 
    <div style="border: 1px dashed #ccc; width: 650px; background-color: #ddd"> 
    <input type="radio" name="action" value="skip" id="skip" /><label for="skip">Ignorieren</label><br> 
    <input type="radio" name="action" value="store" id="store" checked/><label for="store">Speichern</label><br> 
    <br> 
    <center> 
        <input type="submit" id="submitter" value="weiter" /> 
    </center> 
    </div> 
</form> 




    </body> 
</html>
+1
5

Chrome. favicon.ico ( !) . . , , 404 ! - by @chigley

UPDATE

404, .

.htaccess :

RewriteCond %{REQUEST_URI} !^/favicon\.ico [NC] 

OLD DEPRECATED

hm, ... ... , testreason

php :

if($_SERVER['REQUEST_URI'] == "/favicon.ico") return false;

favicon.ico , . .


, .htaccess :

Options +FollowSymLinks
IndexIgnore */*
# Turn on the RewriteEngine
RewriteEngine On
RewriteBase /
#  Rules
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/favicon\.ico [NC] 
RewriteRule . index.php
+4

, . favicon.ico, , /, .

: @TokenMacGuy , , .

+7

, favicon , . , .

+3

, index.php , ( ): .htaccess

ErrorDocument 404

at the end of the file. putting up

RewriteEngine On

did the trick.


helle answer led me to another useful (fairly simple) idea: to find out which query your index.php calls, just put the following at the beginning:

file_put_contents('stats/stats.txt', $_SERVER['REQUEST_URI'], FILE_APPEND);
+2
source

The second challenge is a browser attempt to get a favorite icon (favicon.ico). Obviously, you have one, since your server returned a status of 200, so no problem.

0
source

All Articles