Answer the question
In order to leave comments, you need to log in
Why doesn't it display direct files?
I have this htacceess
Options +FollowSymlinks
RewriteEngine On
# deal with admin first
RewriteCond %{REQUEST_URI} ^/(admin)
RewriteRule ^admin/assets/(.*)$ backend/web/assets/$1 [L]
RewriteRule ^admin/ css/(.*)$ backend/web/css/$1 [L]
RewriteRule ^admin/js/(.*)$ backend/web/js/$1 [L]
RewriteRule ^admin/images/(.*)$ backend /web/images/$1 [L]
RewriteRule ^admin/fonts/(.*)$ backend/web/fonts/$1 [L]
RewriteRule ^admin/Angular/(.*)$ backend/web/Angular/$1 [L ]
RewriteRule ^admin/email_templates/(.*)$ backend/web/email_templates/$1 [L]
RewriteRule ^admin/img/(.*)$ backend/web/img/$1 [L]
RewriteCond %{REQUEST_URI} !^/backend/web/(assets|js|css|images|fonts)/
RewriteCond %{REQUEST_URI} ^/(admin)
RewriteRule ^.*$ backend/web/index.php [L]
RewriteCond %{REQUEST_URI} ^/statics
RewriteRule ^statics/(.*)$ statics/$1 [L]
RewriteCond %{REQUEST_URI} ^/(assets|css|js|images|fonts|img)
RewriteRule ^assets/(.*) $ frontend/web/assets/$1 [L]
RewriteRule ^css/(.*)$ frontend/web/css/$1 [L]
RewriteRule ^js/(.*)$ frontend/web/js/$1 [L]
RewriteRule ^images/(.*)$ frontend/web/images/$1 [L]
RewriteRule ^fonts/(.*)$ frontend/web/fonts/$1 [L]
RewriteRule ^img/(.*)$ frontend/web/ img/$1[L]
RewriteCond %{REQUEST_URI} !^/(frontend|backend)/web/(assets|js|images|css|fonts|img)/
RewriteCond %{REQUEST_URI} !index.php
RewriteCond %{REQUEST_FILENAME} !-f [OR]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ frontend/web/index.php
The point is that for some reason I can't open files by directly visiting site.loc/test.html , i.e. if the file is located in folder frontend/web/test.html, it won't open. What can be wrong?
Answer the question
In order to leave comments, you need to log in
All your requests go through index.php, except for the folders (assets|js|images|css|fonts|img), so everything works correctly. Either add another exclusion for *.html or put it in one of these folders.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question