Answer the question
In order to leave comments, you need to log in
How to fix problem with yii2?
Hello, I started to study yii2, there are no problems with the installation. Later met with a problem.
So the frontend is located here yiinew.loc/frontend/web - working
Blog page is located here yiinew.loc/frontend/web/blog - I get the error:
Not Found
The requested URL /home/dogmar/Dropbox/www/yiinew/frontend/ web/index.php was not found on this server. (The file path is correct)
But it works if you open it like this yiinew.loc/frontend/web/index.php/blog
urlManager config:
'enablePrettyUrl' => true,
'enableStrictParsing' => true,
'showScriptName' => false,
'suffix' => '/',
# Mod_Autoindex
<IfModule mod_autoindex.c>
# Запрещаем просмотр содержимого папок
Options -Indexes
</IfModule>
# Mod_Rewrite
<IfModule mod_rewrite.c>
Options +FollowSymlinks
# Включаем mod_rewrite
RewriteEngine On
# Если это папка или файл, открываем её/его
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# В противном случае перенаправляем на index.php
RewriteRule . index.php
</IfModule>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question