I have a big problem with .htaccess rewrite rule, my code is this:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [L,QSA]
</IfModule>
If i set a in index.php this:
print_r($_REQUEST);
$bufer = ob_get_flush();
file_put_contents('publico'.microtime().'.txt',$bufer);
die();
And enter in my domain ONE TIME http://myweb.test, two files are created in the directory..
EDIT: More info, into the files like “publico0.21721500 1314986273.txt”, the FIRST file have a “array()” string, the SECOND file have a “Array([url] => favicon.ico)” string ??¿
What is the problem?
Thanks!
The favicon is request automatically. So that is your second request.
If you add a favicon to your document root, then you shouldn’t have that issue. You can also confirm that this is the problem by checking your Apache access logs.