dembilesmana
7 months ago
1270
12
Laravel

Multi-website with one system

Posted 7 months ago by dembilesmana

first when i was in codeigniter i used this method to be able to multi-website with one system.

file index.php codeigniter:

$system_path = 'system';

if ($_SERVER['HTTP_HOST'] == 'administrator.localhost1.com') {
    $application_folder = 'administrator/application';
}

if ($_SERVER['HTTP_HOST'] == 'affiliate.localhost1.com') {
    $application_folder = 'affiliate/application';
}

if ($_SERVER['HTTP_HOST'] == 'localhost2.com') {
    $application_folder = 'content/application';
}

my directory codeigniter:

|--- administrator/
|--- affiliate/
|--- content/
|--- system/
|--- index.php

what I want to ask is:

  1. Is this practice good if I implement it on a website?
  2. if yes how do i implement it or if there are other ways please let me know.

Thank you.

Please sign in or create an account to participate in this conversation.