I want to construct three different frontends (brands of the same company with different styles) sharing the same backend data with yii2 advanced template.
But I need to use direct different domains for the frontends. Urls like these:
Thank your for answering giannis.
I want to maintain the products, brands and other tables in an unique backend. Example: products table will have a field with the brand_id to have the relation…
When you write https://company1.com in the browser (general info of the company) the index could view info about the company and info about all products of the different brands.
When you write https://brand1.com in the browser I want to show only the info and products of brand1 with the logo and corporative colors of this brand.
With only one domain, the url to obtain this could be https://company1.com/product/brand1. I can do this but I dont want this url, I want to tranform the url using the direct domains for every brand, like https://brand1.com/product. And show this domain visible in the browser for other pages too… like https://brand1.com/contact… Not transform to company1.com…
I dont know how to do this redirection in a shared hosting. In a .htaccess? in frontend/config.php?
A possible answer could be this. Create the different vhosts in apache. All look at the same controller. Then in controller read the Request->hostinfo data. From there, you can separate per site and give the right response for the view and the database data, meaning creating different sql queries for each site, different render for each site too.