There is a strange redirect. I make a counter based on htaccess and encountered such a problem. When requesting the main page, everything works, and in any folder everything works correctly, but when you open the folder (it is the folder, if it works through sub-admin / index.php, it works) sub-admin, it redirects to http: // localhost / C: /OSPanel/domains/localhost/php/counter.php? F = Yes, and from where it could come, I changed the location of the counter.php file, it was in the php directory, and now just at the root of the site. Here is the .htaccess:
RewriteEngine On RewriteCond %{QUERY_STRING} !count=ok RewriteCond %{REQUEST_URI} !sub-admin #RewriteRule ^.*$ php/counter.php RewriteRule . counter.php I do not understand what the matter is ... Counter.php itself is simple:
<?php die($_SERVER["REDIRECT_URL"]."?".$_SERVER["QUERY_STRING"]);