R
R
Ruslan2017-06-17 11:57:04
Yii
Ruslan, 2017-06-17 11:57:04

How to properly set up aliases in OpenServer, because the server crashes from 404?

Good day. I ran into the following problem: I'm developing a project on AI2 according to the advanced template and I use urlManager for CNC links. In the frontend / web, business / web, backend / web packs, I put .htaccess with the code:

AddDefaultCharset utf-8

Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php

I myself am a beginner and I don’t know how to write code for .htaccess.
I heard that you can set up aliases in openserver so that this thing works, because now apach throws out 404 when I try to go through the menu items (I go to the main page so I manually registered the hom.loc domain to the hom.loc / frontend / web folder).
I tried to register aliases, but there you can choose the final domain from the existing ones. Help deal with the problem.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Maxim Fedorov, 2017-06-19
@Rysl_prog_diz

Read this article on the topic of deploying yii2 on OpenServer

S
Sergey Semenko, 2017-06-17
@abler98

You need to manually add the domain specifying the folder. It's done like this:
569c765f0fec4a63be1b55004aeb4d2e.png

M
Maxim Timofeev, 2017-06-17
@webinar

It is unlikely that the matter is in openserver, with htaccess everything is ok and without additional settings everything should work. Look at the server logs, where it really climbs. Have you started the server itself at all?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question