I have 2 webites that use the same code, but different themes. I’ve been looking at Yii2 and think I can do the same thing, with 2 ‘frontends’. The 2 sites are sub domains of my main site, which is on a hosted server.
I will need at least 1 backend, but I’m not sure how I can access the backend without a sub.sub.domain.
You can use Kartik-v’s yii2-app-practical-a template instead of the Advanced template. Also read the url.md section called “Parameterized hostnames” in the definitive guide. Read the comments under the yii2-app-practical-a description in the Extension area of this site. Put common models, extensions, and modules that are shared among your domain and subdomains including backend under the common directory structure. Create the basic structure for each new subdomain by copying and renaming frontend/ as many times as required. Create your web/ files in the same fashion as backend/.
You can administer all of your applications (i.e., subdomains) from a single backend application.
I’m a bit short of time tonight or would elaborate more, but ask questions if you need more information.
I’m looking for how to translate it out of the box. Way do I need an add on? I understand that someone has figured this out, but it just seems like I have to add a bunch of stuff to make this work, when I didn’t with 1.1. Just seems strange.