Multi site's using sub domains
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Multi site's using sub domains
Hi mate,
Iam new to aimeos. i don't know how to setup multi site routing using sub domain with following configurations:
Main Domain: aimeos.domain.com
Subdomain: aimeos1.domain.com
I created a site named 'aimeos1' and added the following configurations:
In config/shop.php:
'routes' => [
'admin' => ['domain' => '{site}.yourdomain.com', 'prefix' => 'admin', 'middleware' => ['web']],
'jqadm' => ['domain' => '{site}.yourdomain.com', 'prefix' => 'admin/jqadm', 'middleware' => ['web', 'auth']],
'graphql' => ['domain' => '{site}.yourdomain.com', 'prefix' => 'admin/graphql', 'middleware' => ['web', 'auth']],
'jsonadm' => ['domain' => '{site}.yourdomain.com', 'prefix' => 'admin/jsonadm', 'middleware' => ['web', 'auth']],
'jsonapi' => ['domain' => '{site}.yourdomain.com', 'prefix' => 'jsonapi', 'middleware' => ['web', 'api']],
'account' => ['domain' => '{site}.yourdomain.com', 'prefix' => 'profile', 'middleware' => ['web', 'auth']],
'default' => ['domain' => '{site}.yourdomain.com', 'prefix' => 'shop', 'middleware' => ['web']],
'update' => ['domain' => '{site}.yourdomain.com'],
],
In routes/web.php:
Route::group(['domain' => '{site}.yourdomain.com', 'middleware' => ['web']], function () {
Route::get('/', '\Aimeos\Shop\Controller\CatalogController@homeAction')
->name('aimeos_home')->where(['site' => '[a-z0-9\-]+']);
});
Is there anything else that needs to be done? because while loading aimeos1.domain.com its loading the default site?
Iam new to aimeos. i don't know how to setup multi site routing using sub domain with following configurations:
Main Domain: aimeos.domain.com
Subdomain: aimeos1.domain.com
I created a site named 'aimeos1' and added the following configurations:
In config/shop.php:
'routes' => [
'admin' => ['domain' => '{site}.yourdomain.com', 'prefix' => 'admin', 'middleware' => ['web']],
'jqadm' => ['domain' => '{site}.yourdomain.com', 'prefix' => 'admin/jqadm', 'middleware' => ['web', 'auth']],
'graphql' => ['domain' => '{site}.yourdomain.com', 'prefix' => 'admin/graphql', 'middleware' => ['web', 'auth']],
'jsonadm' => ['domain' => '{site}.yourdomain.com', 'prefix' => 'admin/jsonadm', 'middleware' => ['web', 'auth']],
'jsonapi' => ['domain' => '{site}.yourdomain.com', 'prefix' => 'jsonapi', 'middleware' => ['web', 'api']],
'account' => ['domain' => '{site}.yourdomain.com', 'prefix' => 'profile', 'middleware' => ['web', 'auth']],
'default' => ['domain' => '{site}.yourdomain.com', 'prefix' => 'shop', 'middleware' => ['web']],
'update' => ['domain' => '{site}.yourdomain.com'],
],
In routes/web.php:
Route::group(['domain' => '{site}.yourdomain.com', 'middleware' => ['web']], function () {
Route::get('/', '\Aimeos\Shop\Controller\CatalogController@homeAction')
->name('aimeos_home')->where(['site' => '[a-z0-9\-]+']);
});
Is there anything else that needs to be done? because while loading aimeos1.domain.com its loading the default site?
Last edited by mohan on 05 Sep 2024, 04:10, edited 1 time in total.
Re: Multi site's using sub domains
Most likely the content only the content is the same. Change anything in the CMS module for your "aimeos1" site to see if the content changes.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star