I decided to use PHP routing on my website.
Having done the following: I added the following structure in .htaccess :
AddDefaultCharset utf-8 <IfModule mod_rewrite.c> RewriteEngine On Options +FollowSymlinks RewriteBase / RewriteRule ^(.*)$ index.php [L,QSA] </IfModule> Thus, any virtual address is redirected to index.php and I further process it there as I need.
site.com- loads main pagesite.com/reg- loads the reg pagesite.com/reg/login- loads the reg page and sends to its parameter as a string with the value loginsite.com/blog/art/123456- loads the blog page and transfers to its parameter as an array [art] => 123456site.com/log/name/admin/pass/123- loads the log page and passes an array[name] => admin [pass] => 123
At the root of the site there is only a handler, an error page and a stub. The site itself is located in the /app folder.
And now the crux of the problem. Why the site itself can not connect resources, it also redirects to the error page? The problem remains with the fonts that bootstrap and partially js connects to.
CSS and JS I connected using PHP. But this option does not suit you, is it possible to somehow allow access to the site to access its own files, and to process user requests?
RewriteRule ^(.*)$ index.php [L,QSA]add the linesRewriteCond %{REQUEST_FILENAME} !-dandRewriteCond %{REQUEST_FILENAME} !-fso that existing folders and files are not redirected toindex.php. - Visman