Trying to set up the CNC.
This is what .htaccess looks like:
RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteRule .* index.php?c=$0 [QSA] <FilesMatch "\.(php)$"> Deny from all </FilesMatch> <FilesMatch "index.(php)$"> Allow from all </FilesMatch> In the index.php file, the URL is broken down by a slash. And depending on what we have in the URL, connects the desired controller. Everything is working fine.
But there is one problem. When contacting site.ru/index.php, the main page opens. When contacting site.ru/index.php?c=add, it opens the same that opens at site.ru/add.
How to make the site work only on CNC, and when contacting an address like site.ru/index.php ... was there an error 404, or a redirect to the main page?