V
V
Vladimir2016-08-31 12:21:53
Yii
Vladimir, 2016-08-31 12:21:53

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

2 answer(s)
A
Andrew, 2016-08-31
@MasterGerold

.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

URL manager:
'urlManager' => [
            'enablePrettyUrl' => true,
            'showScriptName' => false,
        ],

D
Dmitry, 2016-08-31
@slo_nik

Good afternoon.
What symbol?
Have you written the rules for urlManager?
Let's get more information.
Well, what of that? What does linux have to do with it?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question