Answer the question
In order to leave comments, you need to log in
Why is Yii2 not following a link?
Good day! Installed the basic Yii2 template (via Composer). Removed comments from urlManager and stopped following links. That is, any added character in the address bar gives a 404 error. What could be the problem? Thanks in advance.
PS I work in Linux
Answer the question
In order to leave comments, you need to log in
.htaccess in index.php folder
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
</IfModule>
# Если это папка или файл, открываем его
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# В противном случае перенаправляем на index.php
RewriteRule . index.php
'urlManager' => [
'enablePrettyUrl' => true,
'showScriptName' => false,
],
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question