Yii2 project inside Yii2 project

Hello everyone!
There is a working project on Yii2 basic. The task is to create exactly the same project in the folder of this project, which will eventually go its own way.
Two separate projects.
In other words, tell me how to run a separate site on Yii2 basic located in a folder inside the site on Yii2 basic.
I understand that it is necessary to resolve through .htaccess
Thanks for help

Hello,

I am curious as to what use case that applies to…?

If you what you want is separate apps (eventually) perhaps the advanced template would work for you?

Regards

1 Like

Create a module with its own controllers and models and it will share environment with current app. When time comes just move the folders to root dir of the project and then refactor namespaces and some configurations if necessary and you are good to go!

Thanks for the reply guys. Yes, I came to the same decision to use a module. Managed to convince the costumer that Yii inside Yii is not a good idea.

You can also use advanced template of Yii2 it will help you to create multiple projects. you can share resources between.

1 Like