L
L
leni_m2019-03-22 16:26:19
Yii
leni_m, 2019-03-22 16:26:19

Why doesn't yii2 run like this on hosting?

transferred the site to the hosting, connected the database, gave the rights to the assets daddy, but the site does not work at all: even the debugger is not displayed to see what's wrong.
On LAN, it is requested like this:
5c94e22f134d0877974221.png
On hosting 404:
5c94e24bee05d212095996.png
Can anyone tell me what's the matter here?
.htaccess at the root:

RewriteEngine on
RewriteRule ^(.+)?$ /web/$1

.htaccess in web folder:
RewriteBase /

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

RewriteRule . index.php

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lander, 2019-03-22
@leni_m

If I were paid every time I see a similar question here - I would not work.
Your hoster gives you a configured domain for some folder like public_html. In this folder you should place the contents of your web folder. And the rest of the folders are on the same level as the public_html folder. And .htaccess should only be in the web folder.
So the contents of your directory will look like this:

...
controllers
models
...
public_html
...
vendor
...

That is, the public_html folder will perform the functions of the web folder. And there will be no web folder.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question