The PHP script was accessed once in the browser, but executed twice

the code for accessing index.php
index.php in the browser is as follows:
file_put_contents (". / log.log","abcn",FILE_APPEND);


abc
abc

appears when
log.log visits this page once in a browser.

this happens from time to time, for some unknown reason, but not in non-url rewriting mode

Php
Mar.25,2021

is there a mistake between url redirection and url rewriting?


I guess the reason is that when requesting index by default,
the browser will have two requests

.
  • one is the
  • that requests the favicon.ico
  • one is a normal index request

maybe your redirection rule is not perfect, you should set a separate rule.
in fact, you can find out

by looking at the debugging tools of the browser.

rewrite rule issues

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3b8ac-2afe5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3b8ac-2afe5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?