Answer the question
In order to leave comments, you need to log in
How to upload a site on yii2 to hosting?
Hello! Tell me, what are the features when publishing on a site hosting on yii2 advanced? The hoster has a public_html folder, and I have frontend, backend, etc. folders. On local hosting, in the openserver settings, I set aliases for the frontend to the frontend/web folder, and for backenda to the backend/web folder. Please tell me what to copy and how to organize it correctly?
Answer the question
In order to leave comments, you need to log in
Through support, put the necessary subdomains on the necessary folders, or place .htaccess at the root with the following content:
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/(backend/web|admin)
RewriteRule !^frontend/web /frontend/web%{REQUEST_URI} [L]
RewriteCond %{REQUEST_URI} ^/admin$
RewriteRule ^admin /backend/web/index.php [L]
RewriteCond %{REQUEST_URI} ^/admin
RewriteRule ^admin(.*) /backend/web$1 [L]
Copy the project to public_html.
Specify the path for example.com in frontend/web
Create a subdomain a.example.com and specify the path for it in backend/web.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question