1. It is necessary that absolutely all requests go to processing in index.php in such a way that, for example, a request of the form example.com/* (just add an asterisk) is also sent to index.php, rather than deducing Access Forbidden.
  2. If there is a match with the name of a folder or file, then run the query without index.php

    1 answer 1

    In .htaccess :

     RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php 
    • This option does not handle the asterisk in the request, gives access forbidden. example.com/* - an error, but if example.com/123/* - all the rules - Bogdanfar
    • I use OpenServer (Apache 2.4). Maybe there is something to edit. I checked on the test server beget.ru - there are all the rules with an asterisk, but on the local I can not cope with it - Bogdanfar