Answer the question
In order to leave comments, you need to log in
Yii2: Made a prettyUrl and the site doesn't open the Login page by default. How to fix?
At the address localhost/web , everything opens normally - a template site from the Yii2 archive ActionLogin should open at the
address localhost/web/login , but instead - Object not found! (404)
Answer the question
In order to leave comments, you need to log in
huh localhost/web/site/login
?
Do you have login in the routes?
'urlManager' => [
'enablePrettyUrl' => true,
'showScriptName' => false,
'rules' => [
'contact' => 'site/contact',
'about' => 'site/about',
'login' => 'site/login',
],
Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward it to index.php
RewriteRule . index.php
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question