Answer the question
In order to leave comments, you need to log in
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
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [L]
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