Answer the question
In order to leave comments, you need to log in
How to specify site root directory in .htaccess?
I deal with this matter here:
https://github.com/vova07/yii2-start
Reached the moment:
Для frontend my/app/frontend/web определяем адрес http://frontend
Для backend my/app/backend/web определяем адрес http://backend
Answer the question
In order to leave comments, you need to log in
Options +FollowSymlinks
RewriteEngine On
# deal with admin first
RewriteCond %{REQUEST_URI} ^/(admin)
RewriteRule ^admin/assets/(.*)$ backend/web/assets/$1 [L]
RewriteRule ^admin/css/(.* )$ backend/web/css/$1 [L]
RewriteCond %{REQUEST_URI} !^/backend/web/(assets|css)/
RewriteCond %{REQUEST_URI} ^/(admin)
RewriteRule ^.*$ backend/web/index .php [L]
RewriteCond %{REQUEST_URI} ^/(assets|css)
RewriteRule ^assets/(.*)$ frontend/web/assets/$1 [L]
RewriteRule ^css/(.*)$ frontend/web/css /$1 [L]
RewriteCond %{REQUEST_URI} !^/(frontend|backend)/web/(assets|css)/
RewriteCond %{REQUEST_URI} !index.php
RewriteCond %{REQUEST_FILENAME} !-f [OR]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ frontend/web/index.php
after Yii 2. How to change backend and frontend url?
SEO url in urlManager yii
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question