Answer the question
In order to leave comments, you need to log in
Why does the single entry point refresh the page twice?
Made a single entry point on .htaccess
AddDefaultCharset UTF-8
Options -Indexes
ErrorDocument 404 /404
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond %{THE_REQUEST} ^(GET|HEAD)\ /index\.php
RewriteRule .* / [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !\..+$
RewriteRule ^(.*)$ /catalog/index.php [L,QSA]
</IfModule>
session_start();
$_SESSION['refresh']++;
print_r($_SESSION);
Answer the question
In order to leave comments, you need to log in
because it's a crooked rewrite/application that handles everything that doesn't exist.
including the favicon which is automatically requested by the browser.
I have already told DevMan and other kafkiansky a hundred times not to mention favicon when they
see the familiar word favicon, noobs stop perceiving anything else, joyfully create this file and consider that the problem is solved, the
keyword here is not favicon, but a crooked application that rushes to be executed for any request, even to a non
-existent address, thousands of requests come to non-existent addresses, and one file does not solve anything here.
a single entry point is not 5 lines of stupid copy-paste in htaksess, but first of all a router that reads the request and decides how it will be executed.
and only after that does or does not execute some code
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question