G
G
goodw842016-04-27 12:00:43
Yii
goodw84, 2016-04-27 12:00:43

How to deploy a project to yii2?

1. I have XAMPP
2. Uploaded a project to htdocs/project1 on Yii
DocumentRoot "E:/WebServer/htdocs/project1 /backend/web"
ServerName backend.project1.local
ServerAlias ​​"backend.project1.local" "www.backend.project1 .local"
Registered in hosts
When I go to backend.project1.local , it redirects me to backend.project1.local/user/login
Error 404
What is missing?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vitaly Yakubenko, 2016-04-28
@goodw84

In the web folder you need to throw the .htaccess file with the following content

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . index.php

N
Nikita, 2016-04-27
@bitver

XAMPP, it means you have Apache, it means go to getting started in the documentation, look for what it says about Apache and realize what you need to do. Wangyu, most likely something in .htaccess is not right.

M
Maxim Timofeev, 2016-04-27
@webinar

If it redirects to user/login, then we open the controller and correct access. The index must be accessible to non-registered users.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question