Answer the question
In order to leave comments, you need to log in
Yii2 in a subdirectory?
Hello gentlemen.
The situation is the following. There is a site - site.ru (let's say the root directory is /var/www/). Yii2 is located in the /var/www/section directory.
Therefore, the input script is available at site.ru/section/web/index.php. Web server - Apache.
Question. What you need to specify in the .htaccess file so that:
1. The main page of the site is available at site.ru/section
2. For the CNC to work and beautiful addresses are picked up by the input script. Those. site.ru/section/news - opened the news controller.
Unfortunately, googling and standard answers to the question did not help, I'm not very friendly with .htaccess.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question