P
P
pif_paf_boom2020-02-02 16:05:57
Yii
pif_paf_boom, 2020-02-02 16:05:57

Why isn't route parsing in yii2 base?

Yii2 does not parse routes. Whatever route I enter into the browser query string, it always redirects to the main page of the site. There is one route in the query string, for example: '/admin/default/index' , and in the debug panel, the route does not change and is always '/site/index'.
I also debugged in index.php such variables as $_SERVER['QUERY_STRING'] is empty, and $_SERVER['REQUEST_URI'] is filled with data from the query string.
There might be something wrong with .htaccess files.
The first file in the root of the project:

Options -Indexes
IndexIgnore */*

Options FollowSymlinks
RewriteEngine on
RewriteRule ^([^/].*)?$ /web/$1


The second one is in the /web folder:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [L]


Help please :)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question