Answer the question
In order to leave comments, you need to log in
How to set up access to files from the web in yii2?
Often there is a need for the one who manages the content to fill in the web folder, for example, robots.txt or files like yandex_439f6a0ecf66cf4e.html or Google, or statistics files that do not require programming and just need to be.
On yii2, you can currently access images and some other files from the web folder.
How to make it possible to access site.ru/yandex_439f6a0ecf66cf4e.html without creating a view and a controller ?
or
What should I change so that files with .html permission are also opened from the web?
Answer the question
In order to leave comments, you need to log in
Specify the corresponding rule in .htaccess, since you did not bring your own, I cannot say what exactly to write there.
You can do something like this in the root of frontend / web
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question